Mapweaver
Contents |
Introduction
Mapweaver is the successor of Mapgen.pl. Mapgen has evolved too much and became a mess to maintain. So some new concepts were followed when porting mapgen to mapweaver:
- way more modules for better maintenance
- better configuration possibilities (ini file i.e.)
- easier rule file in text format (no more conversions needed)
- extended command line help (all options and are explained and possible attributes of objects listed).
- verbose and debug mode
- no more scaling in rules and command line options. everything is handled on 300dpi basis. less confusing.
- most map elements can now be moved to different locations
- some sizes in rules can scale between fromScale and toScale (minSize:maxSize)
Program is still under development... Looking forward to bug reports and wishes.
Outstanding features
- Fully automatic SVG map creation from OSM files (XML/bz2/pbf)
- Automatic conversion to PNG (different dpi) and PDF
- Automatic extraction of needed data out of OSM file; just specify a place name or node ID
- Way label replacement by numbers if way is too short - incl. legend/key in map (optional)
- Circles and discs around nodes
- Scale objects according to map scale
- Normal grid, coordinate grid, POI and Street Directory (with grid reference; and as PDF)
- Map legend (possibly in separate file)
- Map ruler
- Renders POIs from external POI file
- Renders Shields instead of names/refs if desired
- Label transformation, i.e. to use upper case letters for a given name
Sample files
Some samples can be found on the Mapgen.pl page since it basically is the same rendering machine. New samples here:
- Media:Mw_sarki_bn.png
- Media:Mw_sarki_gmap.png
- Media:Mw_sarki_wire.png
- Media:Mw_places.png
- Media:Mw_city.png
- Media:Mw_fire.png
Manual and Help
There is not yet a complete manual. But most parts of the mapgen manual can be used. For differences see output of command line option -help or here: Mapweaver/Help.
Installation
On Ubuntu:
1. Make folder:
mkdir mapweaver cd mapweaver/
2. Checkout subversion repository
svn co http://svn.openstreetmap.org/applications/utils/gary68
3a. install dependencies
sudo apt-get install libcompress-bzip2-perl libgd-graph3d-perl libmath-polygon-perl
3b. if desired, osmosis for OSM related tasks, inkscape for dealing with svg files
sudo apt-get install osmosis inkscape
3c. install Geo::Proj4 and its dependencies:
sudo apt-get install proj libproj-dev sudo cpan Geo::Proj4 sudo cpan DBI
NOTE: If proj is not available on your Debian version, you might try first downloading from http://svn.osgeo.org/metacrs/proj/trunk/proj/src/ the files projects.h and proj_api.h then copy these files with admin privileges to /usr/include/
3d. latex packages for pdf export
sudo apt-get install texlive-latex-base texlive-latex-bin
4. unpack icons.zip:
mkdir icons cd icons unzip ../icons.zip cd ..
5. create mwconfig.ini and populate mwStandardRules.txt (or copy them :) ).
6. launch the program with
perl mw.pl -in=yourfile.osm
Updating
cd mapweaver/ svn up http://svn.openstreetmap.org/applications/utils/gary68 ./
Files
ini file
# config file out=gerhard.svg scaleset=25000 pdf=1
Rule file
The rule file format completely changed from Mapgen.
Empty lines and lines beginning with "comment" or "#" are allowed.
Some examples are on this page
Icons
Icon sets can be obtained here:
Whishes / Todos
- single icon for area
- ps/eps export
- license texts mapweaver, mapgen and dir.pl
- examine textures in PNG
- triangles for connecting page numbers
- declutter stats
- relation analyzer
- tag statistics
- scale patterns of areas
- multi language support (mwDir)
- extract places given by polygons/multipolygons?
- support borders better
- space management for route labels
Recently implemented
- show GPX files; Prg for directories can now be configured (0.37)
- new space management for labels and icons (0.36)
- support pbf files; halo for labels; bold and italic fonts; label transformations (0.34)
- -onewayautosize=X: automatic size of oneway arrows, in percent of way size [0..100] (0.33)
- -maxtargetsize; define max width and height of map in cm (0.32)
- -wnsunique; ways will not be labeled more than once (0.31)
- wns in separate file as well -wns=5 (0.30)
Source
If you checkout the svn, you shouldn't need to access the repository.