#150 map size reduction osmosis script

closed
nobody
None
5
2013-03-16
2011-06-11
Martin
No

Osm2GpsMid could have an optional parameter to execute osmosis on basis of the style file to reduce the input map size.

I attached my Linux script which reduces the map size. I'm using it to create a Germany map for car routing on my 4 GB machine. It expects a script named runOsmosis in the actual directory to start osmosis. The parameters for the map are in the top of the script. It reduces the input pbf and creates a file with selected ways. Than it creates another file containing all POI's. Both files are merged to one file at the end.

I also attached a patch which changes the style file and moves different way types some zoom levels up. It also uses federal state borders instead of city borders. Only borders and motor ways are in the outer zoom level. This way it is possible to zoom out to see the whole Germany map on mobiles with less than 32 MB of memory.

Discussion

  • Martin

    Martin - 2011-06-11

    Linux script to reduces OSM map size

     
    Attachments
  • Martin

    Martin - 2011-06-11

    style file patch for the use with large maps

     
    Attachments
  • Jozef Riha

    Jozef Riha - 2011-06-16

    thank you, i always though osmosis was a memory hog. thanks to your patch i now stand corrected. here's the helper script (requires xmlstarlet installed) that should aid user to construct task1 and task2 strings based on osm2gpsmid style: http://pastebin.com/qX4XLgkg

    you should also be aware that use of --way-key-value/--way-key-value is deprecated and --tag-filter should be used instead (see osm wiki).

    jose

     
  • Jozef Riha

    Jozef Riha - 2011-06-19

    changing idTrackerType=BitSet to idTrackerType=Dynamic helped to push down memory consumption even further so i could process slovakia.pbf (~90 MB) on a machine with 512MB ram which was not possible before. furthermore adding omitmetadata=true option to write-bin slightly reduces output file (while still keeping it usable for osm2gpsmid).

     
  • Billi25

    Billi25 - 2011-06-28

    Thanks for the scripts. I had to update xmlstarlet to version 1.0.5 (see https://launchpad.net/ubuntu/natty/i386/xmlstarlet/1.0.5-1\) on my "Ubuntu 10.04 LTS Lucid" mashine to get the helper script to run without error.

     
  • Jozef Riha

    Jozef Riha - 2011-06-28

    @billi25: sorry for the hassle, xmllint --xpath can be used instead of xmlstarlet just as well.

     
  • Martin

    Martin - 2011-07-18

    I attached a simplified version of the script which also takes the mentioned suggestions into account.

     
  • Martin

    Martin - 2011-07-18

    new version

     
    Attachments
  • Martin

    Martin - 2011-07-18

    I attached a new style and color file.
    The style file puts water into a higher zoom level again to keep the possibility to zoom out a whole country. The style also changes many styles making previously overdrawn buildings and areas visible. The style changes colors to be similar to open street map.

     
  • Martin

    Martin - 2011-07-18
     
    Attachments
  • Martin

    Martin - 2011-07-18
     
    Attachments
  • Martin

    Martin - 2013-03-16
    • status: open --> closed
     
  • Martin

    Martin - 2013-03-16

    The style file style-file-martin.xml is available on git.
    The script is good to create a reduced map without changing a style file.
    Maybe it should be put into wiki.

    Closed.

     
  • Martin

    Martin - 2013-03-16
    • status: closed --> open
     
  • Martin

    Martin - 2013-03-16
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks