Very brief instructions on how to render your own TopOSM-style map. To be improved.
- USGS National Elevation Dataset. 1-degree data was used for TopOSM Colorado. Download from the USGS Seamless Server.
- USGS National Hydrography Dataset. The hi-res shapefiles were used for TopOSM Colorado. Download, by sub-basin, from the NHD Geodatabase.
- Download a planet.osm dump, or an extract for your area.
- Get the standard World Boundaries data set (which includes built-up areas).
You'll need (at least) the following software:
- A working Linux (or Linux-like) system
- PostgreSQL w/ PostGIS
- Python and mapnik python libs
- shp2pgsql (provided in the postgis package on Fedora)
- The PerryGeo tools (hillshade, colormap)
- GDAL (including the bundled tools)
- The TopOSM scripts, config files and symbols. Download here
- On Fedora you will need the proj-nad package
How to render
- Download the data to separate directories. Leave the archives unzipped.
- Set up a Mapnik/PostGIS database. Some scripts may assume that it's named osmdb.
- Modify and run import_planet (file paths, bounding box) to import OSM data and run some preprocessing.
- Modify colors.txt, which defines RGB values for elevation levels, to match your area. Note that the elevation unit in NED (and thus this file) is meter.
- Modify and run prepare_ned (file paths etc) to generate hillshading and colormaps for the whole area, and to generate and import contour lines.
- Modify and run import_nhd (file paths etc) to import hydrography features into the database.
- Modify constants in toposm.py (directories, tile sizes/counts).
- Modify include/dbsettings.inc
- Modify us-render.py to render the area you're interested in (and, optionally, the mapnik tiles you need).
- Run us-render.py. See the comments in that file for how to run it on multiple CPUs/cores/machines.
Note that prepare_ned expects the NED ZIP file to contain directories in the form NED_*/ned_* . The new nationalmap does not follow that. You will need to unzip and re package correctly if you get your files from there.