[GraphHopper] Can graphhopper work with any specific spatial reference system?

Peter graphhopper at gmx.de
Thu Nov 20 12:53:55 UTC 2014


Hi Per,

I highly doubt that it will have a big performance impact, also there is
no viable alternative ;) !

> if it was possible without changing source code

that is not viable IMO

> to do it client side on the fly

it will be the same if not slower if done in JavaScript (?). Also it
makes consuming your API harder, I would go server side transforming.

> Does somebody know about any good documentation or examples for client
side transformation to start from?
> Expecially if anybody already done it with graphhopper route API

There is no such thing to my knowledge. But e.g. if you do it server
side you need to change WebHelper.encodePolyline and points.toGeoJson in
the GraphHopperServlet, not sure if something else.

> Is there a prefered javascript library for handling Google Polyline
Encoding?

You'll have to use our provided js code in order to properly handle
elevation too

Regards,
Peter

On 20.11.2014 12:24, Per Laas wrote:
> Thanks for quick answers. And many suggestions.
>
> I have no experience with client side transformation on the fly and am
> not sure how much performance impact it has. Loadtests with mapserver
> here shows that the throughput is 30 to 50 percent lower when we do
> server side transformation in mapserver on the fly, though no special
> optimization. That is one reason I thought it might be good to have
> everything pretransformed at server side before starting up
> graphhopper and creating "routedata", if it was possible without
> changing source code. From what I understand from your reply it is not
> an easy option as it needs a lot of code rewriting.
>
> But maybe it should be no big problem to do it client side on the fly
> as it is usually not that many coordinates to transform, especially
> compared to draw a whole map image. Also I guess we might need routing
> in the standard reference system anyway.
>
> Questions:
> -Does somebody know about any good documentation or examples for
> client side transformation to start from? Expecially if anybody
> already done it with graphhopper route API.
> -Is there a prefered javascript library for handling Google Polyline
> Encoding?
>
> Thanks a lot again for your answers.
>
> Regards,
> Per
>
> --- graphhopper at gmx.de wrote:
>
> From: Peter <graphhopper at gmx.de>
> To: graphhopper at openstreetmap.org
> Subject: Re: [GraphHopper] Can graphhopper work with any specific
> spatial reference system?
> Date: Thu, 20 Nov 2014 11:32:56 +0100
>
> Hi Per,
>
> I completely agree with Jan. Also doing the transformation on the
> server side (e.g. in GraphHopperServlet) could be another solution.
>
> Regards,
> Peter
>
> On 20.11.2014 11:29, Jan Torben Heuer wrote:
>
>     Hi Per,
>
>     I recommend to do it client side, it should be fairly easy to draw
>     the graphhopper response (Google Polyline Encoding) with
>     OpenLayers (which then takes care of projections).
>     If you prefer a server-side solution, you can use geotools to
>     covert between 4326 and 3011 before sending the result to the
>     client. I don’t see much benefit in doing it server-side.
>     If you even change the projection in the source file, prepare to
>     change large parts of the code base.
>
>     HTH,
>
>     Jan
>
>     Am 20.11.2014 um 11:21 schrieb Per Laas <per.laas at muchomail.com
>     <mailto:per.laas at muchomail.com>>:
>
>         Hi!
>
>         Very good work you have done with graphhopper. Uppsala local
>         government in Sweden uses SWEREF 99 18 00 (SRID 3011) as
>         spatial reference system for most maps using among others
>         Mapserver, geowebcache and OpenLayers. It could be nice to add
>         some routing in these maps.
>
>         -Is it possible to make graphhopper service API work with this
>         spatial reference system? Maybe by creating a osm.bpf with
>         this spatial reference system? I do not know if it is possible
>         at all, for example using ogr2osm.
>
>         -Isit possible to make the graphhopper client to work with
>         this spatial reference system? It seems the default client
>         uses leaflet. I have read somewhere leaflet is not so strong
>         handling different spatial reference systems.
>
>         -Is there somebody who know if anybody has used graphhopper
>         service API with OpenLayers?
>
>         -Is there any documentation how to use graphhopper with your
>         chosen spatial reference system?
>
>         Appreciate any answers
>         Thanks, Per
>
>         ----------------------
>         Per Låås
>         Valloxvägen 20
>         74142 Knivsta
>         Tel: +46-18-343561
>         Mob: +46-725-196540
>         per.laas at muchomail.com <mailto:per.laas at muchomail.com>
>         ----------------------
>
>
> _______________________________________________ GraphHopper mailing
> list GraphHopper at openstreetmap.org
> </eonapps/ft/wm/page/compose?send_to=GraphHopper%40openstreetmap.org>
> https://lists.openstreetmap.org/listinfo/graphhopper
>  
> ------------------------------------------------------------------------
> The Free Email with so much more!
> =====> http://www.MuchoMail.com <=====
>
>
> _______________________________________________
> 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/20141120/e6303fd4/attachment.html>


More information about the GraphHopper mailing list