<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Per,<br>
      <br>
      I highly doubt that it will have a big performance impact, also
      there is no viable alternative ;) !<br>
      <br>
      > if it was possible without changing source code<br>
      <br>
      that is not viable IMO<br>
      <br>
      > to do it client side on the fly<br>
      <br>
      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.<br>
      <br>
      > Does somebody know about any good documentation or examples
      for client side transformation to start from?<br>
      > Expecially if anybody already done it with graphhopper route
      API<br>
      <br>
      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.<br>
      <br>
      > Is there a prefered javascript library for handling Google
      Polyline Encoding?<br>
      <br>
      You'll have to use our provided js code in order to properly
      handle elevation too<br>
      <br>
      Regards,<br>
      Peter<br>
      <br>
      On 20.11.2014 12:24, Per Laas wrote:<br>
    </div>
    <blockquote cite="mid:20141120032411.80F3D0B2@m0005299.ppops.net"
      type="cite">
      <div style="font-family:Arial, sans-serif; font-size:10pt;">Thanks
        for quick answers. And many suggestions.<br>
        <br>
        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. <br>
        <br>
        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.<br>
        <br>
        Questions:<br>
        -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.<br>
        -Is there a prefered javascript library for handling Google
        Polyline Encoding?<br>
        <br>
        Thanks a lot again for your answers.<br>
        <br>
        Regards,<br>
        Per<br>
        <br>
        --- <a class="moz-txt-link-abbreviated" href="mailto:graphhopper@gmx.de">graphhopper@gmx.de</a> wrote:<br>
        <br>
        From: Peter <a class="moz-txt-link-rfc2396E" href="mailto:graphhopper@gmx.de"><graphhopper@gmx.de></a><br>
        To: <a class="moz-txt-link-abbreviated" href="mailto:graphhopper@openstreetmap.org">graphhopper@openstreetmap.org</a><br>
        Subject: Re: [GraphHopper] Can graphhopper work with any
        specific spatial reference system?<br>
        Date: Thu, 20 Nov 2014 11:32:56 +0100<br>
        <br>
        <div>Hi Per,<br>
          <br>
          I completely agree with Jan. Also doing the transformation on
          the server side (e.g. in GraphHopperServlet) could be another
          solution.<br>
          <br>
          Regards,<br>
          Peter<br>
          <br>
          On 20.11.2014 11:29, Jan Torben Heuer wrote:<br>
        </div>
        <blockquote> Hi Per,
          <div><br>
          </div>
          <div>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).</div>
          <div>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.</div>
          <div>If you even change the projection in the source file,
            prepare to change large parts of the code base.</div>
          <div><br>
          </div>
          <div>HTH,</div>
          <div><br>
          </div>
          <div>Jan</div>
          <div><br>
          </div>
          <div>
            <div>
              <div>Am 20.11.2014 um 11:21 schrieb Per Laas <<a
                  moz-do-not-send="true"
                  href="mailto:per.laas@muchomail.com">per.laas@muchomail.com</a>>:</div>
              <br>
              <blockquote>
                <div style="font-family:Arial, sans-serif;
                  font-size:10pt;"><font size="2">Hi!<br>
                    <br>
                    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.<br>
                    <br>
                    -Is it possible to make graphhopper service API work
                    with this spatial reference system? Maybe by
                    creating a osm.bpf with this </font><font size="2"><font
                      size="2">spatial reference system?</font> I do not
                    know if it is possible at all, for example using
                    ogr2osm.<br>
                    <br>
                    -Is</font><font size="2"> it 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 </font><font size="2">spatial
                    reference systems.<br>
                    <br>
                    -Is there somebody who know if anybody has used
                    graphhopper service API with OpenLayers?<br>
                  </font><font size="2"><br>
                    -Is there any documentation how to use graphhopper
                    with your chosen spatial reference system?<br>
                  </font><br>
                  Appreciate any answers<br>
                  Thanks, Per<br>
                  <br>
                  ----------------------<br>
                  Per Låås<br>
                  Valloxvägen 20<br>
                  74142 Knivsta<br>
                  Tel: +46-18-343561<br>
                  Mob: +46-725-196540<br>
                  <a moz-do-not-send="true"
                    href="mailto:per.laas@muchomail.com">per.laas@muchomail.com</a><br>
                  ----------------------<br>
                </div>
              </blockquote>
            </div>
          </div>
        </blockquote>
        <br>
        _______________________________________________
        GraphHopper mailing list
        <a moz-do-not-send="true"
href="/eonapps/ft/wm/page/compose?send_to=GraphHopper%40openstreetmap.org">GraphHopper@openstreetmap.org</a>
        <a moz-do-not-send="true"
          href="https://lists.openstreetmap.org/listinfo/graphhopper">https://lists.openstreetmap.org/listinfo/graphhopper</a>
        <br>
         <br>
        <hr>The Free Email with so much more!<br>
        =====> <a class="moz-txt-link-freetext" href="http://www.MuchoMail.com">http://www.MuchoMail.com</a> <=====</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
GraphHopper mailing list
<a class="moz-txt-link-abbreviated" href="mailto:GraphHopper@openstreetmap.org">GraphHopper@openstreetmap.org</a>
<a class="moz-txt-link-freetext" href="https://lists.openstreetmap.org/listinfo/graphhopper">https://lists.openstreetmap.org/listinfo/graphhopper</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>