Skip to content

Instantly share code, notes, and snippets.

@Pop-Code
Last active December 18, 2015 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pop-Code/5761700 to your computer and use it in GitHub Desktop.
Save Pop-Code/5761700 to your computer and use it in GitHub Desktop.
Get the Mapnik stylesheets
export MAPNIK_INSTALL=/Library/Frameworks/Mapnik.framework/unix
export PROJ_LIB=${MAPNIK_INSTALL}/share/proj
export ICU_DATA=${MAPNIK_INSTALL}/share/icu
export GDAL_DATA=${MAPNIK_INSTALL}/share/gdal
./generate_xml.py --dbname paris_cod --host [host] --user [userdatabase] --port 5432 --password [theuserpassword]
./get-coastlines.sh
git clone https://github.com/openstreetmap/mapnik-stylesheets
cd mapnik-stylesheets
Units Conversion Factor
inches 1
ft 12
mi 63360
m 39,3701
km 39370,1
dd 4374754 Decimal Degrees
in 1
Setup
dpi 72 Screen dots per inch
Units dd Units our map is in for OpenLayers
Factor 4374754 Scale factor based on units.
Bounding Box
(-122,1655000,43,0083000,-122,1077000,42,9505000 )
Left -122,1655000
Right -122,1077000
Top 43,0083000
Bottom 42,9505000
Map DIV The size of the area on the webpage the map will go in.
WIDTH 600 pixel
HEIGHT 600 pixel
dx = Left - Right
Scale = dx/WIDTH * dpi * Factor
Resolution = dx/WIDTH
dx 0,0578
dy 0,0578
Scale 30343,29374
Resolution 0,000096333333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment