Archive

Author Archives: underdark

gis.stackexchange.com is now in public beta. Join the community to learn and/or share GIS knowledge.

Right now, gis.stackexchange.com has 329 users and 395 questions have been asked (92 % answered). The page has only been online for a week now, but the community is growing fast.

Join now and help us advertise this new community page!

QGIS 1.5 Attribute Edit Dialog

QGIS 1.5 Attribute Edit Dialog

Creating new datasets can be a tedious task. To make things easier, QGIS enables users to customize the editing dialogue.

Users can choose from one of the following editing widgets:

  • Line edit <default> – a simple edit box
  • Classification – displays a combo box with the values used for “unique value” classification (symbology tab)
  • Range – allows numeric values within a given range, the widget can be either slider or spin box
  • Unique values
    • editable – displays a line edit widget with auto-completion suggesting values already used in the attribute table
    • not editable – displays a combo box with already used values
  • File name – adds a file chooser dialog
  • Value map – shows a combo box with predefined description/value items
  • Enumeration <postgres only> – a combo box with values that can be used within the columns type
  • Immutable – read-only
  • Hidden – makes the attribute invisible for the user
  • Checkbox – a checkbox with customizable representation for both checked and unchecked state
  • Text edit – an edit box that allow multiple input lines
  • Calendar – a calendar widget to input dates

A useful and powerful way to define layer symbology and labels is using data-defined properties. While many of the options are self-explanatory, others require knowledge about the valid options.

Note: These options are currently only available for the “old” labeling under “Advanced” tab.

Position

Valid options are: left, right, bottom, top, bottom_left, bottom_right, top_left, top_right

Color

I successfully used the color names red, blue, green, black, yellow, and orange.  Alternatively, you can enter color hex-codes: red = #ff0000

BostonGIS has compiled a great cheatsheet for PostGIS 1.5. You’ll find both a web version and a PDF version here: http://www.bostongis.com/postgis_quickguide.bqg.

Additionally, they have published an extensive comparison of   SQL Server 2008 R2, Oracle 11G R2, and PostgreSQL/PostGIS 1.5 spatial features: http://www.bostongis.com/PrinterFriendly.aspx?content_name=sqlserver2008r2_oracle11gr2_postgis15_compare.

The weighted average position of a point cloud can sometimes be more useful than the ordinary average position, especially if there are outliers in the data. The maths behind it is relatively simple:

w ... weight
sum(d) ... sum of distances between the weighted point and all other points
p(w) ... weighted average position

w = 1 / sum(d)

p(w) = (p1*w1 + p2*w2 + ... + pn*wn) / (w1 + w2 + ... + wn)

You’ll only need a function that calculates all distances like in QGIS – fTools – Distance Matrix.

If you know any GIS implementing this function, please post them.

FOSSGIS2011 is going to take place from 5th to 7th April 2011 in Heidelberg, Germany. More information can be found on the conference wiki: http://www.fossgis.de/konferenz/wiki/Main_Page/2011.

You can check this year’s program on http://www.fossgis.de/konferenz/2010/index.de.html.

gis.stackexchange.com (not live yet) could soon be the new Q&A site for anyone interested in GIS. The technology is based on Stack Overflow, meaning that users can rate answers to the questions so that the best one shows up first. If you would like to see this happen, support the proposal here: http://area51.stackexchange.com/proposals/1425/geographic-information-systems?referrer=gnmvpv_s0afgMMEpzVsZAg2.

Update: gis.stackexchange.com is now in Private Beta!

SpatiaLite Manger in QGIS 1.5

SpatiaLite Manager connected to example database (additional data from Natural Earth)

SpatiaLite Manager is a plugin for QGIS for managing spatial data in SpatiaLite databases. It’s based on the PostGIS Manager plugin that provides equal functionality for PostGIS.

In the database view, all tables are listed and it’s easy to distinguish between tables, views and spatial tables of different geometry types. On the right, different tabs show table meta data, table and a map preview for geometry tables.

Additionally, there is an SQL window that allows execution of statements from inside QGIS.

While there’s certainly room for additional functions, this is a great start and facilitates working with SpatiaLite databases considerably. Possible enhancements could be:

  • Functionality to create new layers from within SpatiaLite Manager (now only available through “Add new layer”).
  • SPIT-like importer for shapefiles

Based on QGIS libraries, Marco Hugentobler an his team are developing a QGIS webserver. It’s a WMS server aiming at ease of use and cartographic richness. The project home page can be found at http://karlinapp.ethz.ch/qgis_wms/index.html.

QGIS libraries are used for the underlying GIS logic and map rendering. QGIS Mapserver supports Linux, WinXP and MacOSX and is licensed under GPL.

While some countries give away geographic data for free, in other parts of the world geodata is either expensive or non-existent. Still there are sources that can help you get started with your work or even just provide a base for your GIS experiments.

OpenStreetMap

Probably the best source for road data and other infrastructure data: http://www.openstreetmap.org/.

Natural Earth

Natural Earth is a public domain map dataset available at 1:10m, 1:50m, and 1:110 million scales. (See http://www.naturalearthdata.com/.) You can find a big amount of raster and vector datasets covering the whole world there.

FreeGIS.org

FreeGIS.org is another great source both for GIS software news and data. They host a database linking to many useful sources (http://freegis.org/database/?cat=1).