[GraphHopper] Reg : Creating routing files with our map data
Peter K
peathal at yahoo.de
Wed May 22 14:14:17 UTC 2013
You'll need to either add the appropriate tags e.g.
<way id="10" uid="85761">
<nd ref="10"/>
<nd ref="20"/>
<nd ref="30"/>
<tag k="highway" v="motorway" />
</way>
or adapt Car- or FootFlagEncoder.
But it looks your osm does not follow the OSM standard. E.g. one way and
speed limit are not correctly formatted.
Regards,
Peter.
> Hi,
>
> I had changed the negative values to positive numbers, But the problem
> is not solved same error.. Is this is a bug in graphhopper?
> An sample snippet is given below.. Thanks
>
> <?xml version="1.0"?>
> <osm generator="Merkaartor 0.17" version="0.6">
> <node version="0" lon="-110.1046770" lat="40.3887493"
> timestamp="2013-05-22T17:14:41Z" user="" id="3723" actor="0"/>
> <node version="0" lon="-110.1047642" lat="40.3888130"
> timestamp="2013-05-22T17:14:41Z" user="" id="3724" actor="0"/>
> <way version="0" timestamp="2013-05-22T17:14:41Z" user="" id="3725"
> actor="0">
> <nd ref="3653"/>
> <nd ref="3655"/>
> <nd ref="3723"/>
> <nd ref="3724"/>
> <nd ref="913"/>
> <tag k="_OBJECTID_" v="21"/>
> <tag k="_RoadID_" v="6000 NORTH"/>
> <tag k="_S_Type_" v="C1"/>
> <tag k="_Shape_Leng_" v=" 0.01669977604"/>
> <tag k="_SPEED_LIM_" v="35"/>
> <tag k="_SURF_TYPE_" v="BLACK TOP"/>
> <tag k="_ALIAS_" v=""/>
> <tag k="_ONE_WAY_" v="N"/>
> <tag k="_RD_SYMBOL_" v=""/>
> <tag k="_SHAPE_Le_1_" v=""/>
> <tag k="_ROADID_1_" v=""/>
> <tag k="_S_TYPE_1_" v=""/>
> <tag k="_SHAPE_LE_2_" v=""/>
> <tag k="_SURF_ID_" v=""/>
> </way>
> <bound box="40.302076,-110.174272,40.482466,-109.968265"
> origin="http://www.openstreetmap.org/api/0.6"/>
> </osm>
>
>
>
> On Wed, May 22, 2013 at 6:52 PM, Peter K <peathal at yahoo.de
> <mailto:peathal at yahoo.de>> wrote:
>
> I'll fix that as other software like JOSM also produces such osm
> files.
> See: https://github.com/graphhopper/graphhopper/issues/42
>
> Regards,
> Peter.
>
>> Hi Gurucharan,
>>
>> your osm did not come through as it was too big (I was just
>> requesting a snippet ;))
>>
>> But I looked at it: negative IDs are not supported from
>> graphhopper. You will need to fix that before the import step or
>> create an issue.
>>
>> Regards,
>> Peter.
>>
>>> Hi,
>>>
>>> I am having my map data as a shape files and I want to create
>>> the routing files for this shape files. So I convert my shape
>>> files to .osm file using Merkaartor and when I execute run.sh
>>> command following error occurs,
>>>
>>>
>>> $ ./run.sh osm.osm
>>> ## using java from C:\Program Files\Java\jdk1.6.0
>>> ## using existing osm file osm.osm
>>> ## existing jar found
>>> target/graphhopper-0.1-SNAPSHOT-jar-with-dependencies.jar
>>> ## now running com.graphhopper.reader.OSMReader. algo=astar.
>>> JAVA_OPTS=-XX:PermS
>>> ize=30m -XX:MaxPermSize=30m -Xmx1000m -Xms1000m
>>> 2013-05-22 17:18:39,437 [main] INFO
>>> graphhopper.reader.OSMReader - start creati
>>> ng graph from osm.osm
>>> 2013-05-22 17:18:39,484 [main] INFO
>>> graphhopper.reader.OSMReader - using LevelG
>>> raphStorage|RAMDirectory|5, accepts:CAR, memory:totalMB:992,
>>> usedMB:91
>>> Exception in thread "main" java.lang.IllegalStateException:
>>> Expected nodes not i
>>> n bounds: 0
>>> at
>>> com.graphhopper.reader.OSMReader.writeOsm2Graph(OSMReader.java:271)
>>> at
>>> com.graphhopper.reader.OSMReader.osm2Graph(OSMReader.java:210)
>>> at
>>> com.graphhopper.reader.OSMReader.osm2Graph(OSMReader.java:167)
>>> at
>>> com.graphhopper.reader.OSMReader.osm2Graph(OSMReader.java:141)
>>> at com.graphhopper.reader.OSMReader.main(OSMReader.java:65)
>>> ADMIN1 at ADMIN ~/graphhopper (0.1)
>>> $
>>>
>>> -----
>>> So kindly tell me good solution to rectify this error and Is
>>> Merkaartor tool is good for converting .shp to .osm files.
>>>
>>> --
>>> Thanks & Regards,
>>> -------------------------------------------------------------------------------------
>>> Gurucharan Vijayakumar,
>>> Software Development Engineer,
>>> Chennai.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20130522/6bcf5382/attachment-0001.html>
More information about the GraphHopper
mailing list