After a bit of mapping at the Technopark, we planned to render the map offline. This being a step towards the Fort Cochin Heritage Walk Mapping. So, I banged into the #osm channel on irc.oftc.net with the question, the first answer was Mapnik. But Mapnik, essentially, requires you to generate the Postgresql database instance out of the .osm file using osm2pqgsql or osmosis.
But, the quick method is to use Osmarender. The following steps would let you render a good .osm file into a map.
- Dowload the xml or .osm data subset of your area of interest.
- If you do not have installed subversion system, type sudo apt-get install subversion
- Now, you need to get the latest source files of Osmarender, for that type svn checkout http://svn.openstreetmap.org/applications/rendering/osmarender/
- cd to the directory. Probably cd /home/<user_name>/osmarender/
- Type apt-get install xmlstarlet
- Now, call the magic!
- Type xmlstarlet tr ~/osmarender/xslt/osmarender.xsl -s osmfile=<file_name>.osm ~/osmarender/stylesheets/osm-map-features-z17.xml > <destination_file_name.svg>
- You’re done!
Now you should get an svg of the map. I got something like this by tweeking the stylesheets a bit