Skip to content

problems using simple .osm test file #88

@emiltin

Description

@emiltin

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.

  1. manually create a small .osm file
  2. use osmosis to convert it from .osm to .osm.pbf:
    osmosis --read-xml test.osm --write-pbf test.osm.pbf omitmetadata=true
  3. extract:
    osrm-extract test.osm.pbf
  4. prepare:
    osrm-prepare test.osrm test.osrm.restrictions #this step sometimes fails with segfault 11
  5. 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>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions