i'm trying to get osrm to work with a small manually created .osm file, with the purpose of bulding a test suite based on a small, well-known dataset.
but sometimes the extractor fails with a seg fault 11, and routed hangs when handling requests.
- manually create a small .osm file
- use osmosis to convert it from .osm to .osm.pbf:
osmosis --read-xml test.osm --write-pbf test.osm.pbf omitmetadata=true
- extract:
osrm-extract test.osm.pbf
- prepare:
osrm-prepare test.osrm test.osrm.restrictions #this step sometimes fails with segfault 11
- request a route:
http://localhost:5000/viaroute&start=55.5,12,5&dest=55.52,12,5&output=json&geomformat=cmp #routed hangs here
this is what my .osm file looks like. i created it manaully using a text editor. it consists of 3 nodes, connected by two ways. it opens and looks fine on JOSM:
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
<node id='1' timestamp='2012-01-01T00:00:00Z' version='1' lat='55.50' lon='12.5'>
<tag k='name' v='A' />
</node>
<node id='2' timestamp='2012-01-01T00:00:00Z' version='1' lat='55.51' lon='12.5'>
<tag k='name' v='B' />
</node>
<node id='3' timestamp='2012-01-01T00:00:00Z' version='1' lat='55.52' lon='12.5'>
<tag k='name' v='C' />
</node>
<way id='1' timestamp='2012-01-01T00:00:00Z' version='1' >
<nd ref='1' />
<nd ref='2' />
<tag k='highway' v='primary' />
<tag k='name' v='Road One' />
</way>
<way id='2' timestamp='2012-01-01T00:00:00Z' version='1' >
<nd ref='2' />
<nd ref='3' />
<tag k='highway' v='primary' />
<tag k='name' v='Road Two' />
</way>
</osm>
i'm trying to get osrm to work with a small manually created .osm file, with the purpose of bulding a test suite based on a small, well-known dataset.
but sometimes the extractor fails with a seg fault 11, and routed hangs when handling requests.
osmosis --read-xml test.osm --write-pbf test.osm.pbf omitmetadata=true
osrm-extract test.osm.pbf
osrm-prepare test.osrm test.osrm.restrictions #this step sometimes fails with segfault 11
http://localhost:5000/viaroute&start=55.5,12,5&dest=55.52,12,5&output=json&geomformat=cmp #routed hangs here
this is what my .osm file looks like. i created it manaully using a text editor. it consists of 3 nodes, connected by two ways. it opens and looks fine on JOSM: