Making Maps from OpenStreetMap Data: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
K (Notes)
K (Overview)
Zeile 6: Zeile 6:
  
 
This is a how to/knowhow page about making own web maps from [[OpenStreetMap]] data.
 
This is a how to/knowhow page about making own web maps from [[OpenStreetMap]] data.
* If you are looking for making nice own base maps with own styling for print or web eventually within own region, and without programming
+
* If you are looking for making nice own '''base (or background) maps''' with own styling for print or web eventually within own region, and without programming
 
skills - then this is the place to look for.
 
skills - then this is the place to look for.
* If you are looking for making a map with given base maps, see [[Geovisualisierung]] (german).
+
* If you are looking for making a '''thematic map''' on top of given base maps, use [http://maperitive.net/] or other services (see [[Geovisualisierung]] (german)).
 
* This is still work in progress. Our plan (see Team below) is to put everything in a single script file (tbd.).
 
* This is still work in progress. Our plan (see Team below) is to put everything in a single script file (tbd.).
 
* See also [http://wiki.openstreetmap.org/wiki/Map_Making_Overview Map Making Overview] at OSM Wiki.
 
* See also [http://wiki.openstreetmap.org/wiki/Map_Making_Overview Map Making Overview] at OSM Wiki.

Version vom 19. März 2014, 23:06 Uhr

See also OSM, OpenStreetMap-Daten zu Karten aufbereiten (german)

 >> Work in progress... <<

Overview

This is a how to/knowhow page about making own web maps from OpenStreetMap data.

  • If you are looking for making nice own base (or background) maps with own styling for print or web eventually within own region, and without programming

skills - then this is the place to look for.

  • If you are looking for making a thematic map on top of given base maps, use [1] or other services (see Geovisualisierung (german)).
  • This is still work in progress. Our plan (see Team below) is to put everything in a single script file (tbd.).
  • See also Map Making Overview at OSM Wiki.

Use Case 'Vintage Map'

As a first use case we will show how to make a Vintage Map from OpenStreetMap data.

tbd.

Your Use Case Here?

 If you have a nice map styling (preferrably in CartoCSS) 
 based on any 'map oriented' OSM database, 
 pls. contact us (see Team below)!

Workflow

Pls. note that this is still work in progress and thus experimental, suboptimal and at worst partially broken.

The workflow consists of followin steps:

  • Step 0. Prepare software and config data.
  • Step 1. Download, convert and clip OSM data. You can skip to Step 3 "Style data" if you are in a hurry.
  • Step 2. Enhance and preprocess SQLite dataset.
  • Step 3. Style data.
  • Step 4. Publish map.

As said before, our goal is to wrap step 1 and 2 into one single Python script.

Step 0. Prepare software and config data

  • Install software: OGR/Python, SpatiaLite, TileMill
  • Get config data, e.g. modified osmconf.ini
  • Prepare clip boundary (e.g. liechtenstein_schloss_bbox.geojson)

Step 1. Download, convert and clip OSM data

  • Open command line shell (PBF file in, SQLite/SpatiaLite file out):
 > ogr2ogr -f "SQLite" liechtenstein.sqlite
   /vsicurl/http://download.geofabrik.de/europe/liechtenstein-latest.osm.pbf 
   -dsco SPATIALITE=YES -skipfailures -progress -overwrite 
   --config OSM_CONFIG_FILE osmconf.ini -gt 65536 
   -clipsrc liechtenstein_schloss_bbox.geojson -clipsrclayer OGRGeoJSON 
   -nlt PROMOTE_TO_MULTI

Alternatives (not used further here; this does not mean they are unusable - in contrary! - but that the are just not considered for different reasons):

  • QGIS - reads PDF/OSM data with OGR (like we do here) but with default config and without preprocessing.
  • spatialite_osm_map (OSM import tool from Spatialite) - no config of own tag->attribute mapping, no clipping possible?
  • osm2pgsql - requires PostGIS which is cumbersome being another local server software.
  • osmosis - no tag->attribute mapping?

Step 2a. Enhance SQLite dataset

  • Enhance dataset by shuffling geo objects around (using Spatialite, SQLite file in/out)
  • Convert Polygons to Points and add them to points as POIs.
  • Eventually convert multilinestring to linestring (can TileMill/Mapnik and QGIS handle multilinestrings/multipolygons?).

Step 2b. Do some other preprocessing

  • use preprocessing tools (Python, SQLite file in/out)
  • line smoothing of streets
  • tbd.

Step 3. Style data

  • Start TileMill
  • See CartoCSS and TileMill

Step 4. Publish map

Notes

See also Diskussion:Making Maps from OpenStreetMap Data.

Team