Making Maps from OpenStreetMap Data: Unterschied zwischen den Versionen
Aus Geoinformation HSR
Stefan (Diskussion | Beiträge) K (→Workflow) |
Stefan (Diskussion | Beiträge) K (→Workflow) |
||
Zeile 24: | Zeile 24: | ||
* Step 0. Prepare software and config data. | * Step 0. Prepare software and config data. | ||
* Step 1. Download, convert and clip OSM data. You can skip to Step 3 Style data | * Step 1. Download, convert and clip OSM data. You can skip to Step 3 Style data | ||
− | * Step | + | * Step 2. Enhance and preprocess SQLite dataset. |
− | |||
* Step 3. Style data. | * Step 3. Style data. | ||
* Step 4. Publish map | * Step 4. Publish map | ||
Zeile 31: | Zeile 30: | ||
As said before, the goal is to wrap step 1 and 2 into one single script. | As said before, the goal is to wrap step 1 and 2 into one single script. | ||
− | Step 0. Prepare software and config data | + | === Step 0. Prepare software and config data === |
* Install software: [[OGR]], [[SpatiaLite]], [[TileMill]] | * Install software: [[OGR]], [[SpatiaLite]], [[TileMill]] | ||
* Get config data, e.g. modified osmconf.ini | * Get config data, e.g. modified osmconf.ini | ||
* Prepare clip boundary (e.g. liechtenstein_schloss_bbox.geojson) | * Prepare clip boundary (e.g. liechtenstein_schloss_bbox.geojson) | ||
− | Step 1. Download, convert and clip OSM data (PBF file in, SQLite/SpatiaLite file out): | + | === Step 1. Download, convert and clip OSM data === |
+ | * Open command line shell (PBF file in, SQLite/SpatiaLite file out): | ||
> ogr2ogr -f "SQLite" liechtenstein.sqlite | > ogr2ogr -f "SQLite" liechtenstein.sqlite | ||
/vsicurl/http://download.geofabrik.de/europe/liechtenstein-latest.osm.pbf | /vsicurl/http://download.geofabrik.de/europe/liechtenstein-latest.osm.pbf | ||
Zeile 44: | Zeile 44: | ||
-nlt PROMOTE_TO_MULTI | -nlt PROMOTE_TO_MULTI | ||
− | Step 2a. Enhance SQLite dataset by shuffling geo objects around (using Spatialite, SQLite file in/out) | + | === 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. | * Convert Polygons to Points and add them to points as POIs. | ||
* Eventually convert multilinestring to linestring (can TileMill/Mapnik and QGIS handle multilinestrings/multipolygons?). | * Eventually convert multilinestring to linestring (can TileMill/Mapnik and QGIS handle multilinestrings/multipolygons?). | ||
− | Step 2b. Do some other preprocessing | + | === Step 2b. Do some other preprocessing === |
+ | * use preprocessing tools (Python, SQLite file in/out) | ||
* line smoothing of streets | * line smoothing of streets | ||
* tbd. | * tbd. | ||
− | Step 3. Style data | + | === Step 3. Style data === |
+ | * Start TileMill | ||
* See CartoCSS and [[TileMill]] | * See CartoCSS and [[TileMill]] | ||
− | Step 4. Publish map on the web | + | === Step 4. Publish map === |
+ | * On paper or on the web | ||
* See e.g. [[TileMill]] or [[Geovisualisierung]] | * See e.g. [[TileMill]] or [[Geovisualisierung]] | ||
Version vom 19. März 2014, 21:07 Uhr
See also OSM, OSM-Daten zu Karten aufbereiten(german)
>> Work in progress... (by Hao) <<
Inhaltsverzeichnis
Overview
This is a how to/knowhow page about making nice web maps from OpenStreetMap data.
See also Map Making Overview at OSM Wiki.
Our plan (see Team below) is to put everything in a single script file (tbd.).
Use Case 'Vintage Map'
As a first use case we will show how to make a Vintage Map from OpenStreetMap data.
tbd.
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
- Step 2. Enhance and preprocess SQLite dataset.
- Step 3. Style data.
- Step 4. Publish map
As said before, the goal is to wrap step 1 and 2 into one single script.
Step 0. Prepare software and config data
- Install software: OGR, 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
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
- On paper or on the web
- See e.g. TileMill or Geovisualisierung
Notes
- Test
code fgdfg dfgdg
fff code
.
Team
- Prof. S. Keller
- Hao Feng Tan