[GraphHopper] Using Shapefile as primary data for routing
Joel Haasnoot
joelhaasnoot at gmail.com
Fri Feb 14 14:10:52 UTC 2014
Another way is to use JOSM - it allows you to open Shapefiles and save them
as OSM files. No coding or command line needed. Let me know if you need
step by step instructions.
Joel
----------------------------------------------------------
Joel Haasnoot
On Thu, Feb 13, 2014 at 9:32 AM, Rodolphe Quiédeville <
rodolphe at quiedeville.org> wrote:
> Hi,
>
> What about using shp2osm http://wiki.openstreetmap.org/wiki/Shp2osm to
> do this ? As the result will be an .osm file it will be easy to
> transform it after to a .pbf file with
> http://wiki.openstreetmap.org/wiki/Osmconvert and use it directly with
> GraphHopper.
>
> No programming will be necessary but some shell scripting anyway, I'm
> afraid there is no solution out of the box.
>
> Regards
>
>
>
> Nicolas Gillet <nicolas.gillet at market-ip.com> writes:
>
> > The basic idea is to transform shape files into a graphhopper's graph
> files.
> > So you have 2 steps
> >
> > - Read the source shape files
> >
> > - Create and write the graph files
> > To read shape files in Java there are several libraries like GeoTools
> > To create and write the graph, you will have to use GraphHopper's API.
> >
> > If you're not comfortable with Java programing, this can be a hard time
> though.
> >
> > There are lots of samples showing how to read shape files with geotools,
> a quick search in google should give you dozens of example.
> > For the GraphHopper API the OsmReader class was a perfect sample to work
> on in order to create my own.
> >
> > Regards,
> >
> > Nicolas GILLET
> >
> >
> > Market-IP - Creating Mobile Intelligence
> > Phone : +32 81 33 11 11
> > Fax : +32 81 33 11 10
> > www.market-ip.com<http://www.market-ip.com/> - www.telefleet.com<
> http://www.telefleet.com/> - www.geoplanning.net<
> http://www.geoplanning.net/> - www.drivexpert.net<
> http://www.drivexpert.net/>
> > [Description : cid:image003.png at 01CD5521.849F3340]<
> http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g>
> >
> > De : Muhammad Iqnaul Haq [mailto:iqnaulhaq at gmail.com]
> > Envoyé : mercredi 12 février 2014 15:25
> > À : GraphHopper Java routing engine; Nicolas Gillet
> > Objet : Re: [GraphHopper] Using Shapefile as primary data for routing
> >
> > Hi Nicholas
> >
> > I'm afraid I still not get it because my background is not computer
> science, do you have a refered link like tutorial or example to do this?
> >
> > On Wed, Feb 12, 2014 at 8:38 PM, Nicolas Gillet <
> nicolas.gillet at market-ip.com<mailto:nicolas.gillet at market-ip.com>> wrote:
> > Hi,
> >
> > It's totally possible, I did myself.
> > You will have to write your own reader for your shape files and create
> the graph out of the data you read.
> > If you're working with shape files in Java, you might already know the
> GeoTools library. It's a good start to read shape files.
> > Check the existing GraphHopper's OsmReader to have hints on how to
> create and populate the graph, the rest depends on your data structure.
> > Once the graph is created you can use it as any other GH graph.
> >
> > Regards,
> >
> > Nicolas GILLET
> >
> >
> > Market-IP - Creating Mobile Intelligence
> > Phone : +32 81 33 11 11<tel:%2B32%2081%2033%2011%2011>
> > Fax : +32 81 33 11 10<tel:%2B32%2081%2033%2011%2010>
> > www.market-ip.com<http://www.market-ip.com/> - www.telefleet.com<
> http://www.telefleet.com/> - www.geoplanning.net<
> http://www.geoplanning.net/> - www.drivexpert.net<
> http://www.drivexpert.net/>
> > [Description : cid:image003.png at 01CD5521.849F3340]<
> http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g>
> >
> > De : Muhammad Iqnaul Haq [mailto:iqnaulhaq at gmail.com<mailto:
> iqnaulhaq at gmail.com>]
> > Envoyé : mercredi 12 février 2014 09:33
> > À : graphhopper at openstreetmap.org<mailto:graphhopper at openstreetmap.org>
> > Objet : [GraphHopper] Using Shapefile as primary data for routing
> >
> > Hi all! I'm a new user of graphhopper. I'm working on my final academic
> research right now, the aim of the research is knowing how to make a route
> to avoid traffic-jam.
> > At first I'm working with pgrouting, geoserver, and openlayers but I got
> stucked because my route did not showed up. I found the graphhopper and
> interested on it.
> >
> > But I've a problem, I want to use my own data (it is in shapefile .shp)
> format. Because in Indonesia the road network data from openstreetmap is
> not completed yet I thought. How can I use the data so that it can be used
> to graphhopper?
> > I want to add restricted access to each road that has a traffic jam on
> it, can I able to do this using graphhopper?
> >
> > Need all assistance from you guys :)
> >
> > regards
> >
> > _______________________________________________
> > GraphHopper mailing list
> > GraphHopper at openstreetmap.org<mailto:GraphHopper at openstreetmap.org>
> > https://lists.openstreetmap.org/listinfo/graphhopper
>
> --
> Rodolphe Quiédeville
> Expert Tsung - Consulting en performance des SI
> Tel : 06 13 79 63 41
> http://blog.rodolphe.quiedeville.org
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/graphhopper
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20140214/a6c0b663/attachment.html>
More information about the GraphHopper
mailing list