OSM Tasking Manager/Validating data with Qgis

From OpenStreetMap Wiki
Jump to navigation Jump to search

It is sometimes useful as a HOT Task validator to Use GIS Tools to help.

Here is a procedure to use QGIS to validate tasks on a job

This applies to a Windows Environment and assumes that the Project Lead has created a HOT Exports Job

Create a Folder Somewhere on your System

Go to the following url on a Web Browser AFTER logging into the Task Manager (where ??? is the actual task Number you are validating. You can obtain it from the Url bar on your browser


http://tasks.hotosm.org/job/???/tiles

Press Ctrl-A then Ctrl-C (Select All, Copy)
Create a text file in the working directory called tiles.txt
Open tiles.txt press Ctrl-V (Paste All)
Save the file
Rename the file to tiles.geojson

Now got to the following url ..

http://tasks.hotosm.org/job/???.json

Press Ctrl-A then Ctrl-C (Select All, Copy)
Create a text file in the working directory called geometry.txt
Open geometry.txt press Ctrl-V (Paste All)
Save the file
Rename the file to geometry.geojson


Download the QGis Qml Files from here into your working directory. They are a zip File. Unzip them, and you will have the following 6 files, OSM-Points.qml, OSM-Line.qml, OSM-Polys.qml, OSM-Road.qml, Geometry.qml, Tiles.qml

Open Qgis and add a Bing Aerial Layer

Right Click the Bing Aerial Layer in the Layers Pane and choose set "Project Crs form Layer". This sets the CRS for the entire Project to WGS 84 / Pseudo Mercator (EPSG: 3857)

Save the Project in your working Directory

In qgis, add a New vector Layer (Ctrl+Shift+V) Select Source Type = File and Click Browse Next to File Name, change the file type to GeoJSON[OGR] (*.geojson *GEOJSON) Double Click on the Geometry File you saved earlier on, and Click Open The Layer will be named OGRGeoJSON and added to the top of the Layer List Right Click the Layer name you just loaded and Rename it to Geometry Right The Geometry Layer and Select "Set Layer CRS" Find WGS 84 / Pseudo Mercator (EPSG: 3857) and select that CRS and click OK Right Click on The Geometry Layer in the LAyers Pane and Select Properties At the bottom, Click Load Style Navigate to your Working Directory and Choose the Geometry.Qml File Click OK

Right Click on the Geometry Layer and Click Zoom to Layer Extent

In qgis, add a New vector Layer (Ctrl+Shift+V) Select Source Type = File and Click Browse Next to File Name, change the file type to GeoJSON[OGR] (*.geojson *GEOJSON) Double Click on the tiles File you saved earlier on, and Click Open The Layer will be named OGRGeoJSON and added to the top of the Layer List Right Click the Layer name you just loaded and Rename it to Tiles Right The Geometry Layer and Select "Set Layer CRS" Find WGS 84 / Pseudo Mercator (EPSG: 3857) and select that CRS and click OK Right Click on The Tiles Layer in the Layers Pane and Select Properties At the bottom, Click Load Style Navigate to your Working Directory and Choose the Tiles.Qml File Click OK

Save your Qgis Project

NOW your Validation Project is Set Up


==

Each Time you want to validate the work done, do the following ..


Go to the Hot Exports Page for the Project you are Validating

If there is not a recent Run for the Exports, perform one. This will create a set of the latest data. Please be mindful that this is a shared resource.

Watch the page, after a few minutes, the new Run will appear

Download The Esri Shapefile(Zipped) created on the run

Unzip the folder into your working directory

You should have Four Shape Files in the directory now Planet_osm_line.shp, planet_osm_point.shp, planet_osm_polygon.shp and planet_osm_roads.shp

If the shape Files are already in your Qgis Project, right Click and Remove Each one

Drag the 4 shape files one by one onto QGis Layers Pane and new 4 New layers will be created

For each of the 4 files, load the style files by Right Clicking the Layer name in the Layers Pane, Selecting Properties. Choose Load Style at the bottom and select the style that matches each layer

Save your Project