Quantcast
Channel: QGIS – Digital Geography
Viewing all 87 articles
Browse latest View live

short announcement: QGIS 2.0.1 Dufour now available on Ubuntu

$
0
0

Times are changing and so should a GIS. Since a long time there was the announcement to release QGIS 2.0 to the public by June. But as there were some blockers in the roadmap the release date was not updated. Everyone suspected a release after the QGIS hackathon and during the FOSS4g conference in Nottingham.
Now it is out: Updating your ubuntugis-unstable PPA in Ubuntu will now install the brand new QGIS 2.0.1 Dufour!
Enjoy and keep on visiting digital-geography!!!

QGIS 2.0.1. as installed by the ubuntugis-unstable PPA

QGIS 2.0.1. as installed by the ubuntugis-unstable PPA


But as Nathan Woodrow (@madmanwoo) answered on my Tweet: “@dig_geo_com @qgis @QGISInfo @qgiswatch /sigh the packages aren’t meant to be uploaded yet. The release isn’t out yet.”
Despite this statement the PPA was updated on the 14th of September.
We will probably see an update of the official ubuntugis PPA in a few days.

Install QGIS 2.0 on Ubuntu

$
0
0

Today QGIS 2.0 was officially released and we will come up with several tutorials in the next weeks. First of all: the installation.
As we are fans of open source we would like to show you the installation on a fresh build Ubuntu system:

Installation on Ubuntu



QGIS strongly depends on the grass libraries so as a first step we will install them:
sudo apt-get install grass

As QGIS 2.0 is not part of the official Ubuntu repositories (aka software provider) we need to enhance the list of software providers. Open up the terminal and edit the sources.list which helds this list:

sudo gedit /etc/apt/sources.list

Now the standard editor of Ubuntu open up and you should add the following lines at the end of the file:

deb     http://qgis.org/debian precise main
deb-src http://qgis.org/debian precise main

If you are running Ubuntu in a different/older version change precise according to your needs. The official support has only precise pangolin aka 12.04 as the latest release. Save and close the file.
The download page of QGIS states that you should add the keys via the terminal. The key has changed and is not longer the one mentioned at qgis.org:
Open up terminal and type

gpg --keyserver keyserver.ubuntu.com --recv 47765B75
gpg --export --armor 47765B75 | sudo apt-key add -

Next of it we need to install one more software provider:

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable

To update your local catalog of available software use the heavy line

sudo apt-get update

And in the end we are ready to go to install QGIS 2.0 Dufour

sudo apt-get install qgis python-qgis qgis-plugin-grass

This now takes a while but it will install QGIS on your Ubuntu system. In the end try to start QGIS. If it fails it is possible that you need to make yourself the owner of the qgis folder:

sudo chown -R "your username" ~/.qgis2

And here the video for it:

Have fun and enjoy your QGIS!

Bericht von der FOSS4G 2013 aus Nottingham

$
0
0

Till Adams von Terrestris hat auf dem Portal XING einen schönen Bericht zur diesjährigen Konferenz für freie und offene Software in den Geobereichen (FOSS4G) in Nottingham erstellt. Mit seinem Einverständnis veröffentlichen wir diesen hier und verweisen auf den Blog mit mehr Details:


Fortsetzung der Tradition.

Nach Denver 2011 und einer Pause in 2012 fand in diesem Jahr die internationale “Free and OpenSource Conference for Geoinformation” oder kurz Foss4G (http://2013.foss4g.org), vom 17.-22. September unter dem Motto “Geo for All” in Nottingham, England statt. Vom Veranstalter wurden dazu kurzerhand namhafte Größen wie Nottingham in Mappingham und September in Maptember umbenannt.

Die FOSS4G 2013

In über 30 Workshops, 180 Präsentationen, BOF’s und natürlich vielen Kaffeepausen wurde über die neuesten Entwicklungen aus dem Bereich der Geoinformationsverarbeitung berichtet und diskutiert. Gleichzeitig bietet sich auf der FOSS4G natürlich immer die Gelegenheit, an der internationalen FOSS4G-Community zu partizipieren.
Für terrestris waren in diesem Jahr Marc Jansen und ich selber anwesend.

Am Tag vor dem offiziellen Start der Konferenz fand bereits ein “OpenLayers 3″ – Code-Sprint, an dem auch terrestris (Marc Jansen) teilgenommen hat, statt.

Natürlich ist es unmöglich umfassend über das Event zu berichten, es folgen daher einige persönliche Eindrücke.

Kartengeschichten

Interessant, was mittlerweile gemacht wird mit Webkarten:
MapStory (http://mapstory.org) oder “erzähle deine Geschichte mit Karten”. Einige spannende Geschichten wie die Besiedlungsgeschichte Nordamerikas oder die Entwicklung des New Yorker U-Bahn Netzes existieren bereits.
Die zugrundeliegende Technologie ist GeoNode (http://www.geonode.org), eine Lösung, die für sich als Geosolutions Content Management System versteht.

QGIS

Daneben stand der Tag aus meiner Sicht im Zeichen des QGIS-Projektes, welches soeben die neue Version 2.0 herausgebracht hat. Eine Übersicht über die neuen Features findet sich hier (http://www.slideshare.net/nathanwoodrow/all-the-new-cool-stu…).

Mittlerweile ist QGIS deutlich mehr als ein reines Desktop-GIS, denn mit QGIS-Server und dem auf OpenLayers und GeoExt basierenden QGIS-Client steht mittlerweile eine komplette Lösung für eine komplette GDI bereit. Sehr interessant für alle, deren Finger sich beim Erstellen von SLD’s bisher verdreht haben, ist die Möglichkeit, QGIS-Kartenstyles als SLD abzuspeichern und so direkt z.B. in GeoServer zu nutzen.

Kulinarisches

Abgerundet wurde der 1. Konferenz-Tag mit dem Social Event, wo es die “kulinarische” Auswahl aus klassisch englischem “Fish&Chips”, irischen Stew, schottischem Rinderragout und walisischem Lamm zu probieren gab, Der Abend wurde mit dem britischen Comedy-Duo ” Festival of The Spoken Nerd” abgeschlossen.

OpenSource vs. Proprietär

“We are here and we are not going anywhere”. Dieser Satz von Tim Sutton, Mitglied des QGIS-Entwicklerteams, drückt perfekt aus, das das immer noch oft gegen Open Source hervorgebrachte Argument, Open Source Projekte seien “unstet” und “die Entwickler nächste Woche wieder verschwunden” schlichtweg falsch ist. Dazu verwies Tim auf 11 Jahre QGIS Entwicklung mit mittlerweile mehreren Millionen Zeilen Code, Beispielen und Dokumentation. Angesichts dieser Fakten sollte niemand mehr ernsthaft glauben, das ein solches Projekt über Nacht verschwinden könnte und sich der Einsatz in der eigenen Organisation daher nicht lohnt – zumal professioneller Support und Schulungen mittlerweile von vielen Firmen angeboten wird.

WebMapping Portale

Interessant aus meiner Sicht ist das aufkommen mehrerer (halb-)offener Mapping-Portale, wie MapBox (http://www.mapbox.com) oder MangoMap (http://www.mangomap.com), auch wenn hier die Möglichkeiten der Individualisierung sehr begrenzt sind. Immerhin erlauben es diese, einige wenige Geodatensätze auf einfache Art und Weise zu veröffentlichen. Ein klarer Beweis, das die zugrundeliegende Freie Software reif und robust ist.

OpenStreetMap

Hervorzuheben ist auf jeden Fall das von Kate Chapman geleitete Projekt “Humanian OpenStreetMap Project (HOT)” (http://hot.openstreetmap.org/), welches soziales Engagement und Entwicklungshilfe von und mit OSM-Aktiven fördert. So zeigt das Beispiel HOT, das der Einsatz von Freier Software besonders in Entwicklungsländern sinnvoll ist, denn erlangtes Wissen kann nach dem Ende des Projektes in andere Bereiche übertragen werden. Der Zugang zu der verwendeten Freien Software bleibt bestehen, während dies bei proprietärer Software meist nicht gewährleistet ist. OpenStreetMap Daten, die bereits vorhanden sind und im Rahmen von Einsätzen von HOT-Teams mit Menschen vor Ort komplettiert werden, sind oft die einzige vollständige Geodatenquelle.

3D WebGIS

Viel Neues gibt es auch aus der 3D GIS-Welt zu berichten. Nach meinem eigenen Vortrag über das Projekt “Brandenburg 3D” (http://2013.foss4g.org/conf/programme/presentations/106/ und http://de.slideshare.net/tilladams/foss4g-20), in dem ich über die Visualisierung von 3D-Daten mit PostGIS und GeoServer in einem ExtJS basierendem 3d Viewer berichtete, war besonders der Vortrag von Olivier Courtin von der Forma Oslandia mit dem Titel “new Dimensions in PostGIS: 3D” (http://2013.foss4g.org/conf/programme/presentations/7/) interessant. Fehlende Funktionen die uns noch zu dem ein oder anderen Umweg gezwungen haben, stehen ab der Version PostGIS 2.1 durch die Anbindung der Geometrie-Algorithmen Bibliothek CGAL(http://www.cgal.org) bereit.

GeoExt

Nachmittags wurde eine BOF zum Thema GeoExt abgehalten. Insgesamt ist einige Dynamik zu erwarten, so soll das neue Release GeoExt2 basierend auf ExtJS 4.2.1 nun erscheinen (Jetzt aktuell sitze ich auf dem FOSS4G Codesprint und verfolge interessiert die Arbeit der GeoExt Entwickler Marc Jansen, Bart van den Eijnden und Julien-Samuel Lacroix).

Annual Meeting der OsGeo

Freitag Abends fand dann noch das Annual Meeting der OsGeo Local Chapter statt. Aus deutschsprachiger Sicht ist mit Sicherheit die Neuigkeit, das sich das der FOSSGIS e.V. um die Ausrichtung der FOSS4G 2016 bewerben wird, begrüßenswert. Im Vorfeld hatte sich der Vorstand des Vereins bereits um inoffizielle Stellungnahmen einiger Mitglieder des OsGeo Boards bemüht.

Too much ….

Samstagmorgen, der Tag, an dem sich der Besucher der Konferenz nicht entscheiden konnte und doch musste.

Statusberichte der Projekte OpenLayers, Leaflet, PostGIS, MapServer, MapProxy etc. etc. etc. standen an – die parallele Ansetzung der Präsentationen über den Status der Projekte OpenLayers 3 (http://ol3js.org) und Leaflet (http://leafletjs.com/) ist sicher als etwas unglücklich zu bezeichnen.

UMN MapServer

Interessant sind die neuen MapServer-Funktionen, die ab der Version 6.4 zur Verfügung stehen. Hervorzuheben sind erweiterte Labeling-Möglichkeiten (die für die anstehende Version 7 nochmals komplett überarbeitet werden sollen), die neuen Möglichkeiten zur Darstellung komplexer Symbole sowie die Möglichkeit Ausdrücke (Expressions) in Listenelemente auszulagern, was zu wesentlichen Verschlankungen von Spaghetti-Mapfiles führen dürfte.

Mit dem Projekt ScribeUI (http://mapgears.github.io/scribeui-site/) wurde nun endlich auch eine Oberfläche zur Erstellung und Verwaltung von Mapfiles bereitgestellt. Die Installation ist in weniger als 10 Minuen zu bewerkstelligen (https://twitter.com/juliensam/statuses/381379739468185600).

Dazu wurde eine neue API, die das Erstellen und Erweitern von MapServer-Diensten über einen Remote-Zugriff erlaubt, vorgestellt. Die API deckt in etwa dieselben Funktionen ab, die GeoServer (http://docs.geoserver.org/2.0.0/user/extensions/rest/index.h…) bereits seit einiger Zeit hat und insbesondere für uns immer eine Entscheidung für GeoServer war.
Die Zeiten des textbasierten Parsens von Mapfiles sollten damit der Vergangenheit angehören.

GIS und JavaScript

Über jede Menge Möglichkeiten aus der Welt des “GIS und JavaScript” berichtete zum Abschluß Chris Helm. Erwähnung fanden unter anderem Bibliotheken wie ShapelyJS (https://github.com/chelm/shapely.js/commits/master), TopoJSON (https://github.com/mbostock/topojson), die sich auch bei terrestris im Einsatz befindliche JavaScript TopologySuite (https://github.com/bjornharrtell/jsts),D3 (http://d3js.org/) und viele andere. Damit einhergehend wurde insbesondere die Möglichkeiten, die Vektortiles (=in Kacheln an den Browser ausgelieferte Vektordaten) bieten, diskutiert. Ich selber bin überzeugt davon, das die Verarbeitung von Vektordaten direkt im Browser die ohnehin schon grenzenlos erscheinenden Möglichkeiten des WebMappings revolutionieren wird.

Abschluß

Eine aus persönlicher Sicht etwas ausufernde Dankesorgie samt Kür von zahllosen FOSS4G-Heroes (http://www.flickr.com/photos/stevenfeldman/9776287024/) beendete die Konferenz und gab den Stab weiter an Portland 2014 (http://wiki.osgeo.org/wiki/FOSS4G_2014) wo die nächste FOSS4G stattfinden wird.

QGis Tutorial – Teil 6: Verbinden von Shape- mit CSV-Dateien (tablejoin)

$
0
0

Der sechste Teil eines Tutorials zu essentiellen Arbeiten mit Geographischen Informationssystemen (GIS) unter Verwendung vom openSource Quantum GIS (QGIS). Das Programm könnt ihr euch hier kostenlos herunterladen.

Tutorial 1: Georeferenzierung von Karten mit QGis
Tutorial 2: Erstellung einer topographischen Karte
Tutorial 3: Konvertierung von GPS-Daten (GPX to SHP)
Tutorial 4: Digitalisierung von Karteninhalten (Punkte, Linien und Polygone)
Tutorial 5: Einfache Geländeanalyse von Höhendaten (Raster)
Tutorial 6: Verbinden von Shape-Files mit CSV-Dateien (tablejoin)
Tutorial 7: Einbindung von WMS-Diensten im GIS (WMS, WCS, WFS)

Zielstellung

Ziel ist die Herstellung einer Verbindung von bestehenden Geometrien eines Shapefiles mit externen Tabelleninformationen. Einfaches Beispiel hierfür: Wir haben zum Beispiel eine bodenkundliche Kartierung vorgenommen und möchten im Nachgang Literaturwerte für die einzelnen Bodenschichten etc. hinzufügen. Dieses Tutorial zeigt die einfache Anbindung von tabellarischen Daten an Features eines Shapefiles.

Arbeitsmaterial

Quantum GIS 2.0
Shapedatensatz mit einer ID Spalte
CSV-Datei mit den Zusatzinformationen und einer ID-Spalte

Schritte

1. Einladen der Shape- und CSV-Datei
2. Join
3. Speichern




Schritt 1 – Einladen der Shape-Datei

Wer bereits die letzten Tutorials absolviert hat, für den ist das Einladen von Shape-Dateien in QGis ein Kinderspiel. Ein einfaches Verschieben der gewünschten .shp-Datei auf die Layerübersicht von QGis genügt. Die CSV-Datei wird auf gleichem Wege ins QGis geladen.

Layerübersicht nach Import

Layerübersicht nach Import

Ganz wichtig ist im Vorfeld, dass die SHP- und CSV-Datei jeweils eine Spalte mit Ankerbezeichnungen enthält. Quasi eine Spalte, in der gleiche Inhalte, wie z.B. eine ID oder eindeutige Namen etc. stehen. Nur so ist garantiert, dass eine überschneidungsfreie Verbindung der beiden Dateien funktioniert.

Schritt 2 – Erstellen einer neuen Shapedatei

Ein Rechtsklick auf das Shape-File in der Layerübersicht öffnet das Kontextmenü, in dem wir “Eigenschaften” auswählen. Unter “Verknüpfungen” muss das grüne Pluszeichen ausgewählt werden. Nach Auswahl der zu verknüpfenden Tabelle und den Feldnamen, die den “Anker” enthalten, ist die Verknüpfung bereits abgeschlossen.

Auswahl der Ankerfelder

Auswahl der Ankerfelder

Schritt 3 – Speichern

Sollen die verbundenen Inhalte in der Attributtabelle des Shapes dauerhaft gespeichert werden, muss das Shapefile erneut abgespeichert werden. Dies geschieht am einfachsten mit Hilfe eines Rechtsklicks auf das Shape in der Layerübersicht, “Speichern als…”, Speicherort auswählen und fertig.


Interesse an einer professionellen GIS-Unterstützung? Melden Sie sich!

Berlin und Open Data: ein Vorstoß

$
0
0

Die wichtigste Nachricht vorne weg: Mit dem 01. Oktober gibt das Land Berlin sukzessive seine Geodaten frei. Damit setzt das Land Berlin zusammen mit Hamburg einen weiteren Meilenstein für die Open Data Initiative und ermöglicht es Firmen, Entwicklern und Bürgern Daten zu nutzen, die sie bereits mit den gezahlten Steuern auch bezahlt haben.


Aktuell sind die entsprechenden Daten über den FIS Broker (wer hat sich diesen Namen nur ausgedacht?) des Senats zu erhalten und abrufbar. Der FIS-Broker ist eine Java-basierte Web-Anwendung zur Darstellung von WebMappingServices und WebFeatureServices um diese Seiten ohne ein GIS darzustellen. Auf den Seiten der Senatsverwaltung für Stadtentwicklung und Umwelt sind für die entsprechenden Services auch die notwendigen Adressen eingetragen um die WMS/WFS Dienste zum Beispiel mit QGIS zu konsumieren:

WMS Server Berlin

Die Daten zum TK10 WMS Server des Landes


TK10 Berlin QGIS

Der TK10 WMS in QGIS


Somit ist es nun sehr einfach z.B. die TK10 digital für seine Analysen zu benutzen ohne eine Karte scannen zu müssen. Ein Nachteil hat das ganze: Laut Anfrage der Piraten Berlin fehlen dem Land erstmal ca. 1.1 Millionen Euro an Einnahmen. Was man aber nicht vergessen darf: Die Daten sind bereits bezahlt und werden nur vorgehalten. Wie stark die Auswirkungen auf die Wirtschaft sind, lässt sich schlecht beziffern.

Installation of QGIS 2.0 Dufour on Windows

$
0
0

The installation of QGIS 2.0 is fairly easy on Ubuntu but much easier using Windows as an operating system. The installer is very handy and is provided by the OSGEO4W project (Open Source Geospatial Foundation for Windows).


Download the installer and open the executable file. Now you can choose between three different installations. As we are using QGIS as a desktop GIS we will go with the express installer:

qgis, installation first screen

QGIS installation: first screen with desktop installation

Next we are asked which software we would like to install. To stick with the simple QGIS installation and a working one as well, we will choose to install QGIS, GRASS and GDAL as the last two ones provide very good functionalities in QGIS and therefore increase usability of this excellent open source GIS:

second screen: QGIS, GRASS and GDAL

second screen: QGIS, GRASS and GDAL

The download process and the installation took some time on my virtual machine but it is running without any failures:

installation progress from QGIS

installation progress from QGIS

At the end of the process you just need to restart and you can enjoy your totally free open source state of the art GIS:

installed QGIS running on Windows

installed QGIS running on Windows

georeferencing images in QGIS using OSM data: how to distort the City

$
0
0

You probably already referenced maps with written coordinates but using photos or images is a little different as you need some characteristic points so you can control the position of the image according to the real world. In this little tutorial I’ll show you how to do a so-called image to image refernciation using Open Streetmap data and QGIS 2.0.1 Dufour.


Data

What we will use is an image from the BVG the public transport agency of Berlin which shows the lines of city- and underground trains in Berlin and surrounding areas:

public transport map berlin

small version of the public transport system plan of Berlin

As you can see it’s a generalized map and we will certainly distort the image by draping it over real world data. You can download a high-res version here (attention 69 mb!).

the georeferenciation

Open up QGIS and start the openlayers plugin. Make sure that the project has UTM coordinate system of your location (EPSG: 32633 in my project WGS84 UTM Zone  33N) as coordinate reference system (CRS). The OpenStreetMap (OSM) base layer is referenced to EPSG 3857 but is rendered to fit the 32633. The difference: using 4326 as the CRS you will get coordinates like 13,15265° and not 2345624.13214 which is a relational coordinate comparable in UTM system but is has meters as unit which is very nice to handle. For some performance issues I am using the OpenCycle version of OSM as it renders a little faster.
Next open up the Georeference using Raster->Georeferncer and use CTRL+O to open a new unreferenced raster in the Georeferencer. Now we need to find some well distributed points or “crossings” in our map and find the corresponding position in the OpenCycleMap. If you have a point, use the CTRL+A to add a control point. In the dialogue for this point use From map canvas to get the coordinate for this point:

georeferencing with map coordinates

first dialogue: use map coordinates

Now search for this selected place on the OpenCycleMap and select this point. If you need to pan or zoom on the OpenCycleMap you will loose this selector option. Just switch tabs again and press once more on From map canvas.
If you have selected the correct point in te map you will get an entry in the list of ground control points which translates original XY coordinates (more or less pixel numbers) to real-world coordinates:

Table of Ground Control Points with old and new coordinates

Table of Ground Control Points with old and new coordinates

It is always said use as lots of points as possible. Of course: linear transformation only needs 2 points, polynomial transformation with 1 degree needs 3 points and so on.
I will now go on after I’ve set 13 GCPs in my project. Let’s choose the transformation now:

transformation dialogue

transformation dialogue

As you can see I am sticking with nearest neighbour interpolation. You can definitely choose cubic or something so the picture would not look so blocky. The main difference in tranformation type is shown in this ESRI image:

transformations

affine (polynome first order), and higher order polynomial transformations

After setting the transformation properties, resampling method, output name and target SRS (coordinate system) you can press okay. All settings are made and by pressing CTRL+G (the “play” button) the image is referenced and stored in the desired location.

results

Lets face the different results. I’ll leave the interpretation to you. We will start with an overview animated GIF:

animated overview gif: polynomial 1, 2, 3 and spline interpolation results (click to enlarge (2.4mb)

You can see the different degrees of distortion. Polynomial transformation with a third degree polynom has also some strange behaviour at the borders.
Now let’s have a look at the details in the lower section of the image:

animated overview gif: polynomial 1, 2, 3 and spline interpolation results (click to enlarge (2.4mb)

Now: happy georeferencing!!!

Labels in QGIS 2.0: selektiv beschriften

$
0
0

Da in der QGIS-Version 2.0 die Funktion „nur gewählte Objekte beschriften“ nicht mehr existiert, soll ein Workaround nur bestimmte Objekte des Shapefiles beschriften, ohne ein neues Shapefile exportierten zu müssen.

Hierfür wird letztendlich nur das zu beschriftende Shapefile benötigt.

Möglichkeit 1 – nur bestimmte Werte  über einen Ausdruck beschriften

In QGIS 2.0 gibt es in den Layereigenschaften, im Tab Beschriftungen –> Darstellung –> Beschriftungsoptionen (engl.: Labels –> Rendering –> Label options) den  Punkt „Datendefiniert/Beschriftung anzeigen“. Hierfür muss die Beschriftung mit dem jeweiligen Attribut, in dem die Beschriftung enthalten ist, aktiviert sein.  Mit einem Klick auf „Bearbeiten…“ im Bereich Ausdruck öffnet sich das Bedingungsfester, das einigen z. B. vom Feldrechner bekannt sein dürfte.

labeloptions

Hier  wird nun der Ausdruck definiert, der als Bedingung für die Beschriftung dienen soll. Beispielsweise:
“build_no” > 10
Nun werden nur die Polygone beschriftet, deren Werte in der Spalte build_no größer als 10 sind. Hier können auch komplexere Bedingungen mit weiteren Feldern definiert werden, je nachdem welche Objekte beschriftet werden sollen.

query

Möglichkeit 2 – nur bestimmte Objekte über eigenes Attribut beschriften

Es kann jedoch passieren, dass die zu beschriftenden Objekte sehr zufällige Attributwerte haben, die nicht klar zu definieren sind. Um diesen Fall darzustellen, wurde ein neues Attribut label angelegt, welches als Integer Typ mit einer Länge von 1 definiert wurde.  Die Objekte die nun beschriftet werden sollen, erhalten beim Digitalisieren oder nachträglich über die Attributtabelle den Wert „1“. Der Ausdruck bei der datendefinierten Beschriftungsoption muss dabei lediglich auf
„label“ = 1
gesetzt werden. Nun werden alle Objekte angezeigt, die den Wert 1 im Feld label enthalten.

attribute label

Für die schnelle Vergabe der Werte kann der Feldrechner über die Attributtabelle genutzt werden. Die zu beschriftenden Objekte werden ausgewählt und im Feldrechner wird die Option „Nur ausgewählte Objekte aktualisieren“ ausgewählt. Es soll ein vorhandenes Feld erneuert werden – und zwar das Feld label. Der Ausdruck ist auch hier „label“=1, da alle markierten Objekte den Wert 1 im Attribut label zugewiesen bekommen sollen, und schon sind alle markierten Objekte mit dem entsprechenden Wert versehen.

Optional –Checkboxen statt Eingabezeile nutzen

Möchte man schon beim Digitalisieren die Objekte als „zu beschriftend“ oder nicht definieren, aber nicht jedes Mal den Wert 1 oder 0 eintippen, kann das Feld label als Checkbox definiert werden. In den Layereigenschaften unter dem Punkt Felder, kann in der Spalte Bearbeitungselement für das jeweilige Feld (hier label) statt Eingabezeile Kontrollkästchen gewählt werden. Die Standardwerte können hierbei unverändert bleiben. Hakt der Nutzer nun die Checkbox an, wird eine 1 in die Attributtabelle geschrieben, bleibt sie nicht angehakt, erhält das Objekt im Feld label den Wert 0.

checkbox as linewidget

Beim Digitalisieren erhält man nun das Kontrollkästchen zum schnellen Aktivieren der Beschriftung und auch in der Attributtabelle kann mit einem Doppelklick auf das jeweilige Feld der Wert per Checkbox gesetzt werden. Natürlich können Objekte auch weiterhin per Feldrechner mit dem Wert 1 versehen werden ohne unzählige Checkboxen anzuhaken. Je nach Datensatzgröße und Digitalisierungsvorgehen kann die Arbeit somit beschleunigt werden.

checkbox @new feature


Labels in QGIS 2.0: selective labelling

$
0
0

Because the function „label selected features only“ does not exist anymore in QGIS, a workaround should just label specific features of the shapefile without exporting a new one. For this only the shapefile, which should be labelled, is needed.

Possibility 1 – label certain values with an expression

In QGIS 2.0 you find the setting “data defined/show labels” at Labels -> Rendering -> Label options. For this the labelling must be activated with the certain attribute. With a click on “Edit…” the expression string editor opens, which some of you should know from the field calculator for example.

labeloptions

There you can define the query, which should be used for the labels. For example:

“build_no” > 10

Now only these polygons get labelled, which have a greater value than 10 in the column build_no. Depending on the objects, which should be displayed, also more complex expressions could be used.

expression

Possibility 2 – label specific features with a ‘label’-attribute

It can happen that the features, which should be labelled, have very random attribute values, which cannot be defined very clearly. To display a case like this, a new attribute label was created – defined as type integer with a length of 1. All the features, which should be labelled, get the value 1 when digitizing or afterwards in the attribute table. The expression in the data defined labelling options just has to be changed to

„label“ = 1

Now only these objects will be labelled, which have the value 1 in the field label.

attribute label

For fast entering of the values the field calculator can be used via the attribute table. You just have to select the objects, which should be labelled, and check the option “Only update selected features”. In addition you just update an existing field – in our case the attribute label. The expression “label”=1 is also valid here, because all the features for labelling get the value 1 in the field label and with this all the marked features are set to the certain value.

Optional – Use checkboxes instead of line edit as line widget

If you want to define the feature as “labelled” or “not labelled” just when editing, but without typing a 1 or 0 all the time, the field label can just be defined as checkbox. For this you have to go to the layer properties, tab ‘field’ and there you can change the line widget from line edit to checkbox at the field label. The default values can be left unchanged in this case. If the user checks the checkbox now, the value 1 will be written into the attribute table. If it is uncheck, the object gets the value 0 at the field label.

checkbox as linewidget

When digitizing you now get the checkbox for the fast activating or deactivating of the label for this feature. You can also use this checkbox in the attribute table by double clicking on the field. Of course you just can set features to 1 or 0 with the field calculator without checking numerous checkboxes. Depending on the size of the dataset and the workflow of digitizing, these steps can speed up your work.

checkbox @new feature

QGis Tutorial – Teil 7: Einbindung von WMS-Diensten im GIS (WMS, WCS, WFS)

$
0
0

Der siebente Teil eines Tutorials zu essentiellen Arbeiten mit Geographischen Informationssystemen (GIS) unter Verwendung vom openSource Quantum GIS (QGIS). Das Programm könnt ihr euch hier kostenlos herunterladen.

Tutorial 1: Georeferenzierung von Karten mit QGis
Tutorial 2: Erstellung einer topographischen Karte
Tutorial 3: Konvertierung von GPS-Daten (GPX to SHP)
Tutorial 4: Digitalisierung von Karteninhalten (Punkte, Linien und Polygone)
Tutorial 5: Einfache Geländeanalyse von Höhendaten (Raster)
Tutorial 6: Verbinden von Shape-Files mit CSV-Dateien (tablejoin)
Tutorial 7: Einbindung von WMS-Diensten im GIS (WMS, WCS, WFS)

Zielstellung

Ziel ist die Verbindung zu einem WMS-Layer, der über einen externen Server bereitgestellt wird. Über diese Funktion können (oft kostenfrei) bereitgestellte GIS-Layer in lokale GIS-Projekte eingebunden werden. Eine wirklich interessante Datenquelle, die vor allem durch aktuellen Richtlinien (z.B. INSPIRE) zur reichhaltigen Informationsergänzung herangezogen werden können. Was sind WMS-Layer?

Arbeitsmaterial

Quantum GIS 2.0
WMS-Layer-Adresse

Schritte

1. Verbindung mit einem WMS-Layer herstellen



Schritt 1 – Verbindung mit einem WMS-Layer herstellen

Die Herstellung einer Verbindung zum WMS (Web Map Service) seiner Wahl ist unter QGis sehr einfach. Zum Einbinden wählt man in der Werkzeugleiste das “WMS-Layer hinzufügen”-Tool (siehe Abb.1).

Abb.1

Abb.1

Es öffnet sich das Fenster “Layer eines Servers hinzufügen” (Abb.2), in dem man über “Neu” zum Fenster “Neue WCS-Verbindung anlegen” (Abb.3) gelangt. Hier gibt man dann die WMS-Url des gewünschten Servers ein und vervollständigt die Angaben ggfs. mit Nutzername und Passwort, falls die Daten nur einem bestimmten Nutzerkreis zugänglich sind.


Abb.2

Abb.2


Abb.3

Abb.3


Ich habe mir über Spatineo.com (einer Übersichtsseite zu vielen weltweiten WMS-Servern) das Gewässernetz des Landes Brandenburg ausgesucht und klicke nach der Eingabe eines Namens und der gegebenen Server-URL (http://luaplims01.brandenburg.de/ArcGIS/services/INSPIRE/gewnet/MapServer/WMSServer) auf “Verbinden”. Nun erhalte ich eine Layerübersicht (Abb.4), in der ich mich durch eine Auswahl per Maus für alle Layer entscheide. Nach dem “Hinzufügen” liegen die Daten in meinem aktuellen QGis-Projekt (Abb.5).

Abb.4

Abb.4


Abb.5

Abb.5


Mit diesem einfachen Schritt steht euch eine große Datenmenge im Netz zur Verfügung. Nutz die Möglichkeiten und bereichert eure GIS-Projekte. Bitte achtet natürlich immer auf die variierenden Quellierungsanforderungen der Daten, wenn ihr diese veröffentlichen wollt. Hinweise zu weiteren WMS-Übersichtsseiten findet ihr hier.


Interesse an einer professionellen GIS-Unterstützung? Melden Sie sich!

create 3D visualizations: QGIS, GRASS and NVIZ

$
0
0

3D is soooo cool… Okay let’s be honest: the exciting times of Second Life are gone and the Oculus Rift is still not in sight in the end-user stores. But it is and was always cool to create you own 2.5D (we are using GIS not CAD, you know) visualization and make beautiful graphics for your papers or posters. It was always a big drawback for QGIS that ArcGIS was and is so good with ArcScene. But we’re proud users and we’ll use NVIZ. Let me show you how.


First thing you will need is a DEM. I love the SRTM data set as it is quite reliable and much better in my opinion than the comparable ASTER DEM (when it comes to flat terrain you may see cloud artefacts on the ASTER datasets) but I hope we’ll all benefit from the new world dem in a while . So we will start with a fresh download which gave us this dataset. Loaded into QGIS it looks really “boring” but we will deal with this:

SRTM QGIS 2.0

SRTM data in QGIS using the add Raster function

 As we need NVIZ from GRASS we need to create a new region / mapset for our analysis. We start with this and give the raster more contrast after this: Make sure you have the GRASS plugin enabled and go to Plugins – GRASS – New Mapset :

Click to view slideshow.

First we need to import our raster data to the GRASS project. Therefore go to Plugins – GRASS – Open GRASS tools and open up the Modules List. Search for a function called r.in.gdal.qgis (the r stands for raster and not for R) and select your SRTM dataset as input and use a nice name for the output dataset which will look the same as the input once it is drawn in your GRASS project using the Plugins – GRASS – Import Raster dialogue or the show result button in the current function window

We will now clean up the imported raster data. First we need to get rid of the NULL values which are still coded as -32768. We will use a GRASS function called r.null.val! Therefore go to Plugins – GRASS – Open GRASS tools . In the Modules List you can filter by the name of the function and you will be shortly provided by the questions which raster to use and which value to be set to NULL. This will be -32768 in our case. This will result in a view on the data which looks worse than before. But now the r.colors.table function is our helping friend. Use the same raster as input and select the “Maps relative ranges of raster values to elevation color ramp” and your raster will shine like this:

GRAS, color table

raster after NULL-value processing and color table creation

As we have selected above our current region is a little wide for a 2.5D visualization. So we will create a smaller region to look at with the use of the dialogue Plugins – GRASS – Edit Current GRASS Region and draw the region on the map. Now we are ready to have a look in the 2.5D version using NVIZ in the GRASS tools: Just select the raster as the source for elevation and color and off you go by changing the size of this little fellow

QGIS 2.2 and its new features

$
0
0

The last update of our beloved QGIS 2.0.1. version Dufour was a giant leap for a grown GIS and the next step forward is in sight. Thanks to Mrs. QGIS herself (a.k.a. Anita Graser a.k.a. underdarkGIS) I came across an overview of the changelog for QGIS 2.2 on Linfiniti.com.


multithreading

We probably all have a multicore CPU available at our notebooks and workstations. So why not use them and let them do serious GIS business instead of running idle and having a cup of tea? QGIS with multithread support was apparently available on some special professional versions of QGIS but didn’t made it to the common version till now! What does it mean for your daily work: lot’s of time to do other good things like this video shows you:

map composer

The new map composer was probably one of the most mentioned features of the current release. In 2.2 it gets even more functionality.
The new gradient fill will allow you to visualize polygons with a gradient fill. See Nyall Dawson show some great examples on his blog.
Additionally you will be able to easily flip the color ramp for features in QGIS 2.2. This seems like a basic thing but it wasn’t available till this upcoming versions. This will enhance cartographic output generation like the new cool world file export. The world file export enables you to easily export your map with a worldfile so it can be imported in any project as a georeferenced raster.

what else

So we can be curious whether the developers will stay within their schedule on the release date end of February and see maybe some more details on the FOSSGIS conference in Berlin in March.

The post QGIS 2.2 and its new features appeared first on digital-geography.com.

create point density raster in QGIS

$
0
0

In some applications you want to calculate the density of points. It sounds very easy and in fact it is using QGIS. Let me show you how. Especially, let me show you how to do this with the heatmap plugin in QGIS.

Prerequisities

You will need the common installation of QGIS 2.0.1 Dufour and an installed heatmap plugin (see how to install a plugin here). We will use some field data from Indonesia with 500.000 data points. You may download the data (12MB) we will use here.

The doing


Fire up QGIS and set the CRS of the project according to the used CRS in your data. In our case it is WGS84 Zone 49S which is EPSG:32749 and use the Layer->Add Delimited Text Layer function to add the downloaded test data to your project:

csv txt add QGIS

dialog to add a delimited text file as data source

I’ve chosen to create a spatial index as it improves the handling of this more or less bigger dataset. After this you need to determine the CRS of the data itself:

CRS data source

specify the CRS of your data source

Now your project should look like this:

points in a qgis project

project after adding of points

Creating a point density map is the purpose of the heatmap function/plugin. As you might have this installed prior you should follow Raster->Heatmap->Heatmap. We need to fill the parameters for the heatmap:

paramters heatmap plugin QGIS

parameters for heatmap plugin

I’ve changed the standard parameters a little. The colums Output raster and Output format should be clear. Avoid some special ooutput formats and try to stick with standard GeoTIFF as it is recommended by the author Arun. Radius is the radius to search for points around a location in m or map units (in our case it’s meters as we are using a projected Coordinate Reference System (CRS) with a base unit of m). As we are using the Quartic (biweight) kernel it defines the direct distance to the point itself. I am using 564m as the radius so I can easily state that the values in the raster describe the density for a square kilometer. By using a different kernel this could change as the form of the kernel changes. The Quartic (biweight) seems like a circle kernel.
The rows and columns as well as the cell sizes determine the spatial resolution of the target raster. The finer the raster the longer it takes to compute the raster. Keep this in mind. There are also more parameters to adjust but you may want to press the help button to get some insight in the functionality of the plugin itself.

The results

The resulting map is an image going from black (means small number of points around) to white (large number of points around the given location). We will change this to be more informative. First open the properties of the raster go to the histogram tab and compute the histogram. You will see that the curves reaches till approx. 13 on the x-axis which means that the highest values are about 13 points per km²:

histogram raster qgis

histogram of the result raster

We will use this value in our Singleband pseudocolor representation. Therefore switch over to the Style tab and change the Render Type to Singleband pseudocolor. I am using the color ramp YlOrRd and set the Max value to 13. After this click on Classify and on Ok:

style raster QGIS

style tab selections for raster representation

By using the identify results button you can now check the value at each location:

heatmap point density QGIS

heatmap result in QGIS

You may ask, why the values are not integer. According to the filter we have used, points near a certain location have bigger influence than points far away a given location. So the points are weighted in their influence. This is useful as we might have an underlying uncertainty in the location of points. But if we have several points near each other it should be more certain that the point locations are reliable.

More steps?

For visual impression I like to see some indicators where the values change. Therefore I am using the Contour function in the Raster dialog. The contour creation function is part of the GdalTools plugin by Faunalia. Well the name Contour is a little critical. Basically this function takes a raster image and creates lines of identical values. In our case it is the point density. Go to Raster->Extraction->Contour:

iso line contour in qgis

iso-line creation in QGIS

The interval is set to one and I also would like to have a new column in the line shape file where the value of the current line is stored. The results are better to interpret afterwards. You can easily see the slight right orientation of the data:

results raster iso lines contour QGIS

results with iso lines in QGIS

The post create point density raster in QGIS appeared first on digital-geography.com.

Geonews Januar 2014: Ausblick 2014, Echtzeit Erdaufnahmen, Location-Privatsfähre, LiDar Formate und viel mehr…

$
0
0

Wir von digital-geography.com sind sehr stolz, dass wir ab sofort die deutsche Übersetzung der berühmten Slashgeo Batch Geonews übernehmen dürfen.

Seit 2005 erreicht das Team um Alexandre Leroux (Canada) über 10.000 geoprofessionals auf der ganzen Welt. Ab dem Tag meiner Entdeckung der Slashgeo Batch Geonews habe ich fast alle Folgen intensiv gelesen, da die Zusammenstellungen einen wirklich interessanten Schnitt durch die aktuellen Entwicklungen auf dem Geodaten- und Software-Markt, gerade im Bereich der openSource-Produkte, gibt. Ich wünsche euch nun viel Spaß mit den ersten Batch Geonews auf deutsch. Es gibt Nachrichten, die wir mit aufnehmen sollten? Schreib uns!

Quelle des Artikelbilds: Namensnennung Bestimmte Rechte vorbehalten von A Princess via www.flickr.com


// ]]>

Hier können die Slashgeo’s Batch Geonews im Original (english) gelesen werden.

Slashgeos’s Batch Geonews (ger/en)


open source / open data:

Google:

Apple:

Diskussionen über Slashdot.org:

Maps

Sonstiges

The post Geonews Januar 2014: Ausblick 2014, Echtzeit Erdaufnahmen, Location-Privatsfähre, LiDar Formate und viel mehr… appeared first on digital-geography.com.

Les outils de GRASS sous Quantum Gis

$
0
0

grass

Quantum Gis intégre de nombreux outils issus du SIG GRASS. Cela constitue plus de 200 outils qui sont utilisables directement sous Quantum Gis. Il est possible de croiser les outils disponibles sous Qgis et sous GRASS afin d’effectuer des traitements de données poussés.

Passage de Quantum Gis à GRASS

Pour pouvoir utiliser les outils de GRASS, il faut d’abord créer un nouveau dossier de travail GRASS. Pour cela, Qgis intégre une barre à outils GRASS. Pour créer un nouveau dossier GRASS, selectionnez cette icône.

Créer un fichier de travail sous GRASS

Ensuite, définissez l’url du dossier. Désormais, vous allez pouvoir gérer, créer et éditer des fichiers raster et vecteur. Une fois le dossier créé, vous serez sous GRASS. Pour utiliser les outils GRASS, cliquez sur cette icône.

Ouvrir la boîte à outils GRASS

Vous avez désormais accès à plus de 200 outils GRASS. Ces outils vont de la gestion de fichier à l’utilisation de traitements vecteur ou raster.

Aperçu des outils disponibles sous GRASS
Interopérabilité des outils de Quantum Gis et des outils GRASS

Vous ne pouvez pas directement utiliser un fichier vecteur importé à partir de QGis sous GRASS. Vous devez l’importer dans votre fichier de travail GRASS que vous avez créé. Pour cela, dans la boîte à outils de GRASS, vous disposez d’outils qui vous permettent d’importer des shapefile sous GRASS.<7p>
transfert de fichier entre Qgis et GRASS

Il en va de même pour les fichiers raster. Une fois les fichiers raster et vecteur chargés, vous pourrez alors utiliser tous les traitements de données présents sous GRASS. Une fois vos traitements terminés, si vous voulez réutiliser vos données sous Qgis, il faudra les exporter vers Qgis grâce aux outils présents sous GRASS. Vous pourrez ainsi croiser des chaînes de traitements Qgis – GRASS – QGis. Sachez enfin que les outils GRASS sont disponibles sous sextante. Ce qui est trés pratique si l’on souhaite automatiser des traitements complexes.

En téléchargeant Qgis Dufour, vous disposez de deux SIG pour le prix de zéro : Quantum Gis et GRASS. Il possible de grâce à ces deux SIG de croiser des chaînes de traitement complexe surtout dans le domaine du traitement raster. GRASS dispose d’outil 3D puissants et de traitements de données vecteur complémentaires à celle de Qgis. Passer à côté de GRASS serait du gâchis.

The post Les outils de GRASS sous Quantum Gis appeared first on digital-geography.com.


QGIS 2.2 is coming. Be prepared!

$
0
0

The undercover GIS queen “Underdark” a.k.a. Anita Graser came up with this headline today and we had seen some little insight in the upcoming QGIS release already. So it is in the OSGeo4W installer but it is still experimental…


If you are ready and would like to add some valuable information to the most recent version QGIS 2.2 codename Valmiera give it a try:


qgis 2.2 valmeira osgeo4w installer

QGIS 2.2 Valmeira

But if you rely on a stable version, you should skip it at the moment and wait some more weeks for the new cool features:

  • Support for measurement in Nautical Miles
  • One to many relations support
  • DXF Export tool
  • Paste as new vector layer
  • WMS legend graphic in table of contents and composer

The new release scheme of QGIS will follow a denser cycle. So we will probably see some more drive in the QGIS development. But it will rely on the community and as far as I can see QGIS still fails to get some big impact in development countries and countries like India and China where it seems more common to crack some ArcGIS software as I see it in some bigger facebook groups.
My wish: spread the word about the successfull QGIS and let it grow! Keep your heads up developers, you’re doing great stuff!

____________
Background: QGIS is a user friendly Open Source Geographic Information System that runs on multiple operating systems and is an interesting alternative to the proprietary ESRI ArcGIS suite. You can download and use it for free. Just visit QGIS.org

and choose your language and operating system and off you go with one of the most advanced open source desktop GIS we know.

The post QGIS 2.2 is coming. Be prepared! appeared first on digital-geography.com.

export your qgis project to a webmap with qgis2leaf

$
0
0

It was just a small idea but I haven’t slept much since it came to my mind to build a plugin fo QGIS. It should create a basic webmap from your current layers without coding and with popup functionality and changeable basemaps using leaflet. Meet my new duaghter: qgis2leaf!

idea of qgis2leaf

When building a webmap with leaflet you probably start with a GIS to customize and change your geodata. We do this all the way: remove NaN points, change the projection and change position of features and much more. In the end we export the vector features to a geojson and after that we need to enhance the produced file a bit to give it a variable name. Then we write the leaflet webmap which more or less follows the same patterns:

<script src='data/places_few_1.js' ></script>
	<script>
		var map = L.map('map', { zoomControl:true }).setView([0,0], 2);
		L.tileLayer('http://a.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
		function pop_line_feature(feature, layer) {
			var popupContent = 'some text with relation maybe to the json data';
			layer.bindPopup(popupContent);
		}
		var line_featureJSON = new L.geoJson(line_feature,{
			onEachFeature: pop_line_feature,
			pointToLayer: function (feature, latlng) {
				return L.marker(latlng);
				}
			}).addTo(map);

As we are all human and we are doing failures and it consume pretty much time. And sometimes the only thing you would like to do is to share your qgis data with another one without sending/comressing dozens of shapefiles (remember the *.prj, *.dbf and all the other things). So here comes qgis2leaf.

qgis2leaf: what it does

qgis2leaf builds a webmap from all of your vector data in your current qgis project. It converts and saves them automatically in a folder structure as JSONs (reprojecting them to EPSG:4326 as well and to be exact: geoJSON), enhances them with a var XXX = and change file type to js. Then it creates the basic frame like basemap, popup content from the geoJSONs and the presentation of the layers in the map itself. The whole result is a folder structure with an index.html site which holds the webmap.

how to use qgis2leaf

First you need to install it. You might download it from github as it is still in review by the qgis team ATM (2014/04/24). You must unzip it to the plugin directory of QGIS which is “/home/yourusername/.qgis2/python/plugin/” on Linux and “C:\Users\{username}\.qgis2” on Windows machines. Enable the plugin using the dialog of QGIS (explanation on qgis.org). When you’re using the plugin you just need to define the dimension of the webmap html frame (1280×1024 is default), the basemap and the output folder name:

GUI qgis2leaf plugin

GUI of the new qgis2leaf plugin


The rest will be done by the plugin:
screenshot form the output webmap

screenshot form the output webmap

what next

The next goals will be to enhance the initial view in leaflet regarding the input vector data, add a checkbox for the layer control and some more. If you find some feature useful: create an issue on github and let’s talk about. The big goal is to translate the style of the qgis canvas to a leaflet style… stay tuned and get involved: qgis2leaf on github

The post export your qgis project to a webmap with qgis2leaf appeared first on digital-geography.com.

QGis Tutorial 8: OpenStreetMap (OSM) – Import und Export mit QGis

$
0
0

QGis Tutorial 8: OpenStreetMap (OSM) – Import und Export mit QGis

Tutorial 1: Georeferenzierung von Karten mit QGis
Tutorial 2: Erstellung einer topographischen Karte
Tutorial 3: Konvertierung von GPS-Daten (GPX to SHP)
Tutorial 4: Digitalisierung von Karteninhalten (Punkte, Linien und Polygone)
Tutorial 5: Einfache Geländeanalyse von Höhendaten (Raster)
Tutorial 6: Verbinden von Shape-Files mit CSV-Dateien (tablejoin)
Tutorial 7: Einbindung von WMS-Diensten im GIS (WMS, WCS, WFS)
Tutorial 8: OpenStreetMap (OSM) – Import und Export mit QGis

Zielstellung

Diverse Kartenprojekte setzen mittlerweile auf das globale OpenStreetMap-Projekt. Die freien Geodaten können für bestimmte Regionen, oder auch als Weltdatensatz heruntergeladen und in unterschiedlichster Software bearbeitet werden. Dieses Tutorial dient als Einstieg in die OSM-Datenverarbeitung mit QGis, einer freien GIS-Software, die wir hier im Blog schon mit einigen Tutorials bedacht haben.

Arbeitsmaterial

- Quantum GIS 2

Zeitaufwand

5-10 Minuten




1. OSM-Daten download

Um OSM-Daten in QGis bearbeiten zu können, muss zunächst der Datensatz für die entsprechende Arbeitsregion heruntergeladen werden. Bereits regionalisierte Datensätze finden sich z. B. auf dem Geofabrik-Server, OSM-Exports von Ballungsgebieten stellt Metro Extracts by teczno bereit. Heruntergeladen werden die Daten im *.osm-Format, im gepackten *.pbk-Format und als *.shp, wenn kleinere Regionen z. B. über den Geofabrik-Server geladen werden. Dieses Tutorial befasst sich mit dem *.osm-Format, da im Rahmen von Shapefiles ein umfangreicher Import nicht notwendig ist. Shapes können einfach über “Layer – Vektorlayer hinzufügen” in das aktuelle QGis-Projekt aufgenommen werden.

2. Import der OSM-Daten in QGis

Handelt es sich um kleiner OSM-Datenpakte, kann dieser Schritt durch einfaches Drag & Drop der OSM-Datei auf die Layerübersicht und der anschließenden Auswahl aller Topologien übersprungen werden. Überschreitet der Datensatz einige hundert MB und werden erweiterte Einstellungen für die Attributerzeugung benötigt, lohnt sich der Weg über die folgenden Schritte:

2.1 Import der OSM Topologie nach XML

Nach erfolgreichem Download der gewünschten OSM-Daten lesen wir den Datensatz im QGis ein. Unter “Vektor – OpenStreetMap – Topologie nach XML importieren” öffnet sich die benötigte Import-Maske (siehe Bild 1). Ist der OSM-Datensatz ausgewählt und ein Name für die Datenbank erstellt, kann der Import starten. Hierbei wird eine Spatial-Lite Datenbank erstellt, am gewünschten Speicherort abgelegt und automatisch im QGis zur Verfügung gestellt.

1_OSM_in_QGIS

Bild 1

2.2 Topologie nach Spatial-Lite exportieren

Nach der Datenbankerstellung müssen die Daten für die direkte Verarbeitung in QGis eingelesen werden. Hierzu gehen wir auf “Vektor – OpenStreetMap – Topologie nach Spatial-Lite exportieren” (siehe Bild 2). Unter Eingabe-DB wird die in Schritt 2.1 erstellte Datenbank (z. B. Test.db) gewählt. Der Exporttyp legt fest, welche Feature-Klassen aus der Datenbank ausgelesen werden. Sollen alle verfügbaren Datenbankinhalte (also alle Punkt-, Linien- und Flächendaten des OSM-Datensatzes) importiert werden, muss der Vorgang 2.2 dreimalig wiederholt werden. Der Ausgabelayername legt die Bezeichnung des Layers in der QGis-Anzeige fest. Die Auswahl “Exportierter Tags”, die mit “Aus Datenbank laden” angezeigt werden kann legt fest, welche der Informationen aus der OSM-Datenbank in die Attributtabelle im Spatial-Lite-Format geschrieben werden soll. Oftmals sind nur bestimmte Informationen wirklich notwendig, sodass man mit der Tag-Auswahl an dieser Stelle für übersichtliche Datensätze sorgen kann. Mit “Nach Abschluss der Karte hinzufügen” landet die aktuelle Auswahl in eurer QGis Layer-Ansicht und steht für weitere Bearbeitungsschritte zur Verfügung.

Bild 2

Bild 2

3. Verarbeitung der Daten

Die exportierten OSM-Daten liegen jetzt zur jeglichen GIS-Verarbeitung und weiteren Umwandlung bereit.

4. Export der Daten

Der Export der bearbeiteten Datensätze kann in alle von QGis unterstützten Vektor-Formate erfolgen. Hierzu reicht ein Rechtsklick auf das entsprechende Layer und der Menüpunkt “Speichern als”.

5. Lizenz beachten

Bitte beachtet die Lizenz des OSM-Projektes, wenn ihr die Daten weiterverbreiten und erneut verbreiten wollt.

Viel Spaß beim Import von OSM-Daten in’s QGis und frohes Schaffen.

Gerne stehen wir auch für professionelle Anfragen und Projekte im Rahmen von OSM zur Verfügung. Wir freuen uns auf eure Meldung! - Kontakt aufnehmen!

The post QGis Tutorial 8: OpenStreetMap (OSM) – Import und Export mit QGis appeared first on digital-geography.com.

Installation of QGIS 2.0 Dufour on Windows

$
0
0

The installation of QGIS 2.0 is fairly easy on Ubuntu but much easier using Windows as an operating system. The installer is very handy and is provided by the OSGEO4W project (Open Source Geospatial Foundation for Windows).


Download the installer and open the executable file. Now you can choose between three different installations. As we are using QGIS as a desktop GIS we will go with the express installer:

qgis, installation first screen

QGIS installation: first screen with desktop installation

Next we are asked which software we would like to install. To stick with the simple QGIS installation and a working one as well, we will choose to install QGIS, GRASS and GDAL as the last two ones provide very good functionalities in QGIS and therefore increase usability of this excellent open source GIS:

second screen: QGIS, GRASS and GDAL

second screen: QGIS, GRASS and GDAL

The download process and the installation took some time on my virtual machine but it is running without any failures:

installation progress from QGIS

installation progress from QGIS

At the end of the process you just need to restart and you can enjoy your totally free open source state of the art GIS:

installed QGIS running on Windows

installed QGIS running on Windows

The post Installation of QGIS 2.0 Dufour on Windows appeared first on Digital Geography.

georeferencing images in QGIS using OSM data: how to distort the City

$
0
0

You probably already referenced maps with written coordinates but using photos or images is a little different as you need some characteristic points so you can control the position of the image according to the real world. In this little tutorial I’ll show you how to do a so-called image to image refernciation using Open Streetmap data and QGIS 2.0.1 Dufour.


Data

What we will use is an image from the BVG the public transport agency of Berlin which shows the lines of city- and underground trains in Berlin and surrounding areas:

public transport map berlin

small version of the public transport system plan of Berlin

As you can see it’s a generalized map and we will certainly distort the image by draping it over real world data. You can download a high-res version here (attention 69 mb!).

the georeferenciation

Open up QGIS and start the openlayers plugin. Make sure that the project has UTM coordinate system of your location (EPSG: 32633 in my project WGS84 UTM Zone  33N) as coordinate reference system (CRS). The OpenStreetMap (OSM) base layer is referenced to EPSG 3857 but is rendered to fit the 32633. The difference: using 4326 as the CRS you will get coordinates like 13,15265° and not 2345624.13214 which is a relational coordinate comparable in UTM system but is has meters as unit which is very nice to handle. For some performance issues I am using the OpenCycle version of OSM as it renders a little faster.
Next open up the Georeference using Raster->Georeferncer and use CTRL+O to open a new unreferenced raster in the Georeferencer. Now we need to find some well distributed points or “crossings” in our map and find the corresponding position in the OpenCycleMap. If you have a point, use the CTRL+A to add a control point. In the dialogue for this point use From map canvas to get the coordinate for this point:

georeferencing with map coordinates

first dialogue: use map coordinates

Now search for this selected place on the OpenCycleMap and select this point. If you need to pan or zoom on the OpenCycleMap you will loose this selector option. Just switch tabs again and press once more on From map canvas.
If you have selected the correct point in te map you will get an entry in the list of ground control points which translates original XY coordinates (more or less pixel numbers) to real-world coordinates:

Table of Ground Control Points with old and new coordinates

Table of Ground Control Points with old and new coordinates

It is always said use as lots of points as possible. Of course: linear transformation only needs 2 points, polynomial transformation with 1 degree needs 3 points and so on.
I will now go on after I’ve set 13 GCPs in my project. Let’s choose the transformation now:

transformation dialogue

transformation dialogue

As you can see I am sticking with nearest neighbour interpolation. You can definitely choose cubic or something so the picture would not look so blocky. The main difference in tranformation type is shown in this ESRI image:

transformations

affine (polynome first order), and higher order polynomial transformations

After setting the transformation properties, resampling method, output name and target SRS (coordinate system) you can press okay. All settings are made and by pressing CTRL+G (the “play” button) the image is referenced and stored in the desired location.

results

Lets face the different results. I’ll leave the interpretation to you. We will start with an overview animated GIF:

animated overview gif: polynomial 1, 2, 3 and spline interpolation results (click to enlarge (2.4mb)

You can see the different degrees of distortion. Polynomial transformation with a third degree polynom has also some strange behaviour at the borders.
Now let’s have a look at the details in the lower section of the image:

animated overview gif: polynomial 1, 2, 3 and spline interpolation results (click to enlarge (2.4mb)

Now: happy georeferencing!!!

The post georeferencing images in QGIS using OSM data: how to distort the City appeared first on Digital Geography.

Viewing all 87 articles
Browse latest View live