Tag: howto

Basemaps in QGIS

19.12.2014 16:47 ·  GIS  ·  qgis, howto

When displaying spatial information, it is desirable to have a “context” — some additional data to help you navigate and make the information more readable. This can include administrative boundaries, hydrology, road networks, etc. Such additional layers are called “basemaps”. The term “basemap” is often used to refer exclusively to services such as Google Maps, BING Maps, OpenStreetMap and so on, but this is not correct.

So what is a basemap? It is a background layer (such as a digital elevation model or topographic map) on which thematic layers are overlaid. The basemap is often used for geographic reference and may include elements of the geodetic network. Very often, aerial or satellite imagery is used as a basemap.

At the same time, the widespread use of different map services as basemaps is explained by their accessibility: all that is needed to use them is an Internet connection and minimal GIS skills, whereas the use of other types of data may require some preparatory work, such as georeferencing.

Let’s see how we can use different map services in QGIS.

Read more ››

Getting started with openModeller

02.05.2011 10:00 ·  GIS  ·  openmodeller, howto

Let’s take a look at openModeller, a flexible, robust, open source and cross-platform framework for running ecological niche modelling experiments.

Read more ››

Building TinyOWS on Windows with MSVC

30.04.2011 10:59 ·  GIS  ·  tinyows, howto

A small tutorial on how to build the current version of TinyOWS (the so-called trunk) under Windows XP Professional using Microsoft Visual C++ 2008 Express Edition and libraries from OSGeo4W.

Read more ››

Adding a layer list widget to a PyQGIS application

14.02.2011 09:31 ·  GIS  ·  qgis, python, howto

QGIS is not only a ready-to-use desktop GIS, but also a set of libraries that can be used to create custom GIS applications. Unfortunately, when creating such applications, developers have to implement some GUI elements from scratch. An example of such a widget is the list of loaded layers (sometimes incorrectly called a legend).

In this post I will show the process of embedding a layer list widget into a PyQGIS application. The widget was developed by Germán Carrillo and you can get the code and read how to use it in German’s post “Layer list widget for PyQGIS applications” on the GeoTux blog.

Read more ››

Geographic coordinates to raster (row, column) coordinates

21.07.2010 15:37 ·  GIS  ·  qgis, python, howto

I have noticed that recently many people have asked how to get image coordinates (row, column) from real world coordinates (latitude/longitude). The following code shows how to do this in the QGIS Python console:

import math # needed for floor() function
iface = qgis.utils.iface
# let's assume that raster is a current layer
layer = iface.mapCanvas().currentLayer()
# geographic coordinates
x = 75.0791666
y = 57.2541666
extent = layer.extent()
width = layer.width()
height = layer.height()
# raster resolution (pixel size)
xres = (extent.xMaximum() - extent.xMinimum()) / width
yres = (extent.yMaximum() - extent.yMinimum()) / height
# calculate raster coordinates (row and column)
col = int(math.floor((x - extent.xMinimum()) / xres))
row = int(math.floor((extent.yMaximum() - y) / yres))

Nothing complicated or fancy. The same code can be used in plugin with minimal changes.

Working with vectors using GDAL and Python

15.04.2010 09:55 ·  GIS  ·  gdal, python, howto

GDAL is a free library for working with raster and vector data, OGR is a part of the GDAL and is used to work with vector data. The command line utilities included in the library are widely used to perform a variety of tasks. Thanks to the developed API, you can work with OGR functions from many programming languages. This article is dedicated to using the OGR API in Python and is based on the GDAL Vector API Tutorial.

Read more ››

Working with rasters using GDAL and Python

01.04.2010 09:10 ·  GIS  ·  gdal, python, howto

GDAL is a free library for working with raster and vector data. The command line utilities included in the library are widely used to perform a variety of tasks. Thanks to the developed API, you can work with GDAL functions from many programming languages. This article is dedicated to using the GDAL API in Python and is based on the GDAL Raster API Tutorial.

Read more ››

Compiling PostgreSQL, PostGIS and WKTRaster on Windows

06.06.2009 15:53 ·  GIS  ·  postgis, wktraster, howto

To some extent, PostGIS can be seen as a free, open-source alternative to ArcSDE, but until recently it lacked support for raster data. Lately, a WKTRaster project has been started to fill this gap and develop an extension to support raster data in PostGIS. Perhaps in the near future, PostGIS will be able to offer its users functionality comparable to ArcSDE.

There was an idea to compare the speed of loading a large raster in ArcSDE and PostGIS. Since there are no ready-to-use binary builds of WTKRaster, it is necessary to build and configure the PostgreSQL + PostGIS + WKTRaster bundle before performing any tests.

We will build the latest stable version of PostgreSQL (8.3.7 at the time of writing), the latest SVN version of PostGIS (1.4.0SVN at the time of writing), and the latest SVN version of WKTRaster (0.1.6SVN at the time of writing). This post is based on the official build instructions and blog posts by Mateusz Loskot.

Read more ››

Tables in GIS Geoproject report generator

01.10.2008 18:10 ·  GIS  ·  geoproject, howto

Probably everyone who has started to work with the Report Generator in GIS Geoproject has asked the question: “How can I insert a table in a template?” This question comes up again and again because tables are one of the main elements of various cadastral and geodetic documents (just think of coordinate lists, azimuth tables, and land explications).

At first glance, the lack of standard tools like in MS Word or OOo Writer makes this task impossible. But this is only at first sight. In reality, FastReport, and thus the Report Generator, are at least as good as text editors when it comes to creating tables.

Read more ››

PlaneView object in GIS Geoproject report generator

03.09.2008 19:54 ·  GIS  ·  geoproject, howto

One of the most commonly used primitives of the Geoproject 5.x GIS Report Generator is the Cadastral Plan component (PlaneView). Its short description can be found in the “Geoproject 5” GIS User Manual (chapter 11 Designer — Document Template Editor). Since this component is very powerful and most templates will need it, and since there is not much information in the manual, I think it is time to get to know it.

Read more ››