<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Bulut,<br>
<br>
as you can see from some of the test OSM files, the tagging is
only required for the ways and only if you require this in the
encoder:<br>
<br>
<a class="moz-txt-link-freetext" href="https://github.com/graphhopper/graphhopper/tree/master/core/src/test/resources/com/graphhopper/reader">https://github.com/graphhopper/graphhopper/tree/master/core/src/test/resources/com/graphhopper/reader</a><br>
<br>
<a class="moz-txt-link-freetext" href="https://github.com/graphhopper/graphhopper/blob/master/core/src/test/java/com/graphhopper/reader/OSMReaderTest.java">https://github.com/graphhopper/graphhopper/blob/master/core/src/test/java/com/graphhopper/reader/OSMReaderTest.java</a><br>
<br>
> But now, routing is not working even on a single way element.<br>
<br>
What does 'not working' mean? Is your code working with a standard
OSM file or with one of these test files?<br>
<br>
Kind Regards,<br>
Peter<br>
<br>
On 02.05.2015 16:09, Sander van Tulden wrote:<br>
</div>
<blockquote
cite="mid:2748267D31A69BB0.4E514EF3-A2D1-4FC2-80A2-C8E34E39B1A5@mail.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div>Hi Bulut,
<div><br>
</div>
<div>I don't think the relation elements are needed for routing
via a shapefile network. They aren't present in mine, but you
can add some if you want customization in your flagencoder. </div>
<div><br>
</div>
<div>I think tagging the nodes is also needed indeed, maybe for
the index lookup when you set start and end points? <br>
<div class="acompli_signature"><br>
Greetz,<br>
<br>
Sander van Tulden<br>
</div>
<br>
</div>
</div>
<div class="gmail_quote">_____________________________<br>
From: Bulut Aras <<a moz-do-not-send="true"
href="mailto:bulutaras@gmail.com"
x-apple-data-detectors="true"
x-apple-data-detectors-type="link"
x-apple-data-detectors-result="0">bulutaras@gmail.com</a>><br>
Sent: zaterdag, mei 2, 2015 10:39<br>
Subject: Re: [GraphHopper] Any ideas to convert shape file to
routable osm data?<br>
To: GraphHopper Java routing engine <<a
moz-do-not-send="true"
href="mailto:graphhopper@openstreetmap.org"
x-apple-data-detectors="true"
x-apple-data-detectors-type="link"
x-apple-data-detectors-result="2">graphhopper@openstreetmap.org</a>><br>
<br>
<br>
Hi Sander,<br>
After adding tag element with "highway" key, I successfully
generated<br>
graph, with no exception. But now, routing is not working even
on a<br>
single way element. I will try to add "tag" to node element
also.<br>
<br>
Beside these, is "relation" element needed for graphhopper to
work properly?<br>
<br>
Thanks,<br>
Bulut Aras<br>
<br>
On Fri, May 1, 2015 at 9:18 AM, Sander van Tulden<br>
<<a moz-do-not-send="true"
href="mailto:sander.vantulden@falk.nl"
x-apple-data-detectors="true"
x-apple-data-detectors-type="link"
x-apple-data-detectors-result="4">sander.vantulden@falk.nl</a>>
wrote:<br>
> Hi,<br>
><br>
> The negative ids are normal for JOSM generation, and
wouldn't affect the<br>
> OSM parsing by Graphhopper. Did you mark your nodes and
ways with a custom<br>
> tag to be parsed by Graphhopper? I had that error too,
before I added my<br>
> custom tag to a Graphhopper flagencoder and to my
nodes/ways in JOSM.<br>
><br>
> Does your .osm xml consist of the following structure?<br>
><br>
> <osm version='0.6'><br>
> <node id='-1241' lat='51.521' lon='5.64214'><br>
> <tag k='highway' v='customtag' /><br>
> </node><br>
> <way id='-5152'><br>
> <nd ref='-1241' /><br>
> <nd ref='-5225' /><br>
> <tag k='highway' v='customtag' /><br>
> </way><br>
> </osm><br>
><br>
> Greets,<br>
><br>
><br>
> Sander van Tulden<br>
><br>
><br>
><br>
><br>
><br>
> Op 25-04-15 23:01 schreef Bulut Aras <<a
moz-do-not-send="true" href="mailto:bulutaras@gmail.com"
x-apple-data-detectors="true"
x-apple-data-detectors-type="link"
x-apple-data-detectors-result="7">bulutaras@gmail.com</a>>:<br>
><br>
>>Hi Sander,<br>
>>I tried to do what you described, but when I call
importOrLoad<br>
>>function it fails:<br>
>>"java.lang.IllegalStateException: osm must not be empty.
read <a moz-do-not-send="true" href="tel:1684108"
x-apple-data-detectors="true"
x-apple-data-detectors-type="telephone"
x-apple-data-detectors-result="8">
1684108</a><br>
>>lines and 0 locations".<br>
>><br>
>>Interesting thing is when I inspect the osm file
generated by JOSM, I<br>
>>see negative nodeId values like;<br>
>> <nd ref='-305' /><br>
>> <nd ref='-306' /><br>
>> <nd ref='-307' /><br>
>> <nd ref='-308' /><br>
>> <nd ref='-309' /><br>
>><br>
>>Actually, I'm not sure if this is the problem.<br>
>><br>
>>Thanks.<br>
>><br>
>>On Tue, Apr 21, 2015 at 9:57 AM, Peter <<a
moz-do-not-send="true" href="mailto:graphhopper@gmx.de"
x-apple-data-detectors="true"
x-apple-data-detectors-type="link"
x-apple-data-detectors-result="10">graphhopper@gmx.de</a>>
wrote:<br>
>>> Hi there,<br>
>>><br>
>>> we are interested in this as well for a custom
shapefile import. If<br>
>>> someone is willing to put this under an open source
we would love to<br>
>>> support this and integrate it etc :) !<br>
>>><br>
>>> Kind Regards,<br>
>>> Peter<br>
>>><br>
>>> On 21.04.2015 08:26, Sander van Tulden wrote:<br>
>>>> Hi,<br>
>>>><br>
>>>> We have a similar use case, where we use our
shapefile network within<br>
>>>> Graphhopper. The way we solve this is by first
converting the shapefile<br>
>>>> network with JOSM and plugin "OpenData" to .osm
(xml). We then use<br>
>>>> Graphhopper with minimum settings (using
chWeighting = no and<br>
>>>> prepare.minNetworkSize=1) to parse the
shapefile by using a custom<br>
>>>> Graphhopper encoder class that uses the tags
that the shapefile<br>
>>>>segments<br>
>>>> contain. In our case we had no initial tags, so
in JOSM we just<br>
>>>>selected<br>
>>>> the whole network and gave it a custom tag to
be used in the<br>
>>>>Graphhopper<br>
>>>> encoder class. If you don't yet know how to
make a custom encoder, you<br>
>>>> could use the Bike/Foot one and just add your
custom tag for testing<br>
>>>> purposes.<br>
>>>><br>
>>>> In our case this works pretty well. We don't
have very frequent<br>
>>>>changes to<br>
>>>> the network, so we just prepare the set again
when we need to change<br>
>>>>it.<br>
>>>><br>
>>>> Good luck,<br>
>>>><br>
>>>><br>
>>>> Sander van Tulden<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> Op 20-04-15 19:28 schreef Bulut Aras <<a
moz-do-not-send="true" href="mailto:bulutaras@gmail.com"
x-apple-data-detectors="true"
x-apple-data-detectors-type="link"
x-apple-data-detectors-result="13">bulutaras@gmail.com</a>>:<br>
>>>><br>
>>>>> Hi,<br>
>>>>> We have our own road data. We use Esri
products and want to abandon<br>
>>>>> network analyst tool. How can we export our
data (from un-routable<br>
>>>>> shapefile for example) to use with
graphhopper, manually or<br>
>>>>> programmatically? Out data changes
frequently.<br>
>>>>><br>
>>>>> May networkx library work for us?<br>
>>>>><br>
>>>>><br>
>>>>> Thanks in advance.<br>
>>>>><br>
</div>
</blockquote>
<br>
</body>
</html>