map creation: how to

78 views
Skip to first unread message

deg...@tutanota.com

unread,
May 1, 2020, 3:50:41 AM5/1/20
to OSM Android bikerouting
Ahoi,

trying to create my first segment files out of simple .osm file:

java -cp brouter.jar btools.mapcreator.OsmCutter ./profiles2/lookups.dat tmp ways.dat relations.dat restrictions.dat ./profiles2/all.brf test.osm

returns

*** OsmCutter: cut an osm map in node-tiles + a way file
parsing time (ms) =374
records read: 0 nodes=0 ways=0 rels=0 changesets=0

Is there a verbose mode witch might give a hint ?

Thanks, Dirk

deg...@tutanota.com

unread,
May 1, 2020, 3:59:19 AM5/1/20
to OSM Android bikerouting

abrensch

unread,
May 1, 2020, 9:44:38 AM5/1/20
to OSM Android bikerouting
Hi Dirk,

the XML-Parser is not a "real" XML-Parser, but a very naiv text-parser:


It's used in the unit-test, but not really for productive use. It's very easy to break it, because it makes assumptions on formatting and attribute-sequence, and these assumptions may not be valid for for .osm file.

For productive use, this class is classpath-overwritten by the PBF-Parsing variant.


The current reference for map-creation can be extracted from the production script: https://github.com/abrensch/brouter/blob/master/misc/scripts/mapcreation/process_pbf_planet_production.sh

It does not use a call to "OsmCutter" anymore, but it calls (in that order):

  OsmFastCutter, PosUnifier, WayLinker

I never tested it with the XML-Parser, but it should work in principle

deg...@tutanota.com

unread,
May 1, 2020, 12:51:16 PM5/1/20
to OSM Android bikerouting
java -cp brouter-161.jar btools.mapcreator.OsmCutter ./profiles2/lookups.dat tmp ways.dat relations.dat restrictions.dat ./profiles2/all.brf dreieich.osm works like expected.

It's used in the unit-test, but not really for productive use. It's very easy to break it, because it makes assumptions on formatting and attribute-sequence, and these assumptions may not be valid for for .osm file.
 
http://brouter.grade.de/brouter-server/test.osm is the one, breaking  things ....

deg...@tutanota.com

unread,
May 1, 2020, 1:13:36 PM5/1/20
to OSM Android bikerouting


It's used in the unit-test, but not really for productive use. It's very easy to break it, because it makes assumptions on formatting and attribute-sequence, and these assumptions may not be valid for for .osm file.

a simple ./osmosis --read-xml file="test.osm" --write-xml file="test-2.osm" seems to do the 'formatting' job well ...
Reply all
Reply to author
Forward
0 new messages