<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thanks again Daniel.<br>
      Now i'm trying everything but i get this error in firebug:<br>
      <br>
      <span role="presentation" class="objectBox objectBox-string ">"NetworkError:

        500 Internal Server Error -
<a class="moz-txt-link-freetext" href="http://mydomain.pt/routing/php/pgrouting.php?startpoint=89314.61677724583%20123959.32146482218&finalpoint=90696.99736799067%20123514.05047980057&method=SP">http://mydomain.pt/routing/php/pgrouting.php?startpoint=89314.61677724583%20123959.32146482218&finalpoint=90696.99736799067%20123514.05047980057&method=SP</a>"</span><br>
      <br>
      <br>
      <br>
      I don't have to define password of database in php file?<br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      Em 10-07-2012 13:22, Daniel Kastl escreveu:<br>
    </div>
    <blockquote
cite="mid:CABXBSH-ehA7C4OM4WjS2o8EkPUNY9GLJ+ZtKY3oCoqL69Fmr9w@mail.gmail.com"
      type="cite"><br>
      <br>
      <div class="gmail_quote">On Tue, Jul 10, 2012 at 12:47 PM, Pedro
        Costa <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:pedrocostaarma@sapo.pt" target="_blank">pedrocostaarma@sapo.pt</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000">
            <div>I'm confused.<br>
              My map is in srs 900913 and my tables  in postgis are in
              srs 27492.<br>
              <br>
              In workshop example the points are converted to srs 4326
              why?<br>
              Because the funcion findnearestedge needs the data in srs
              4326?<br>
              If yes, i just need to convert to my table srs (900913)
              correct?<br>
            </div>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Hi Pedro,</div>
        <div><br>
        </div>
        <div>OSM data imported with osm2pgrouting or osm2po are WGS84
          (4326), so this is what you have in the database.</div>
        <div>OpenLayers uses World Mercator projection (900913 and there
          are some aliases), so start point and end point in the
          workshop need to be transformed to 4326.</div>
        <div><br>
        </div>
        <div>In your case you had to replace 4326 with 27492, I guess,
          assuming that you use OpenLayers (GeoExt) and your dataset.</div>
        <div><br>
        </div>
        <div>Daniel</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div> </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000">
            <div> <br>
              <br>
              Thanks<br>
              <br>
              <br>
              <br>
              <br>
                       [1] var startpoint =
              layer.features[0].geometry.clone();<br>
                           startpoint.transform(epsg_900913, epsg_4326);<br>
                           var finalpoint =
              layer.features[1].geometry.clone();<br>
                           finalpoint.transform(epsg_900913, epsg_4326);<br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              Em 10-07-2012 11:09, Daniel Kastl escreveu:<br>
            </div>
            <div>
              <div class="h5">
                <blockquote type="cite">
                  <div>Hi Pedro,</div>
                  <div><br>
                  </div>
                  In which projection are your start and end point?
                  <div>You need to use
                    ST_transform(<geom>,<srid>) if the
                    projection is different.</div>
                  <div>In the workshop the data is in 4326 (WGS84) and
                    so you can find this SRID in the SQL statement.</div>
                  <div><br>
                  </div>
                  <div>Daniel</div>
                  <div><br>
                  </div>
                  <div><br>
                    <br>
                    <div class="gmail_quote">On Tue, Jul 10, 2012 at
                      11:42 AM, Pedro Costa <span dir="ltr"><<a
                          moz-do-not-send="true"
                          href="mailto:pedrocostaarma@sapo.pt"
                          target="_blank">pedrocostaarma@sapo.pt</a>></span>
                      wrote:<br>
                      <blockquote class="gmail_quote" style="margin:0 0
                        0 .8ex;border-left:1px #ccc
                        solid;padding-left:1ex">
                        <div bgcolor="#FFFFFF" text="#000000">
                          <div>I'm trying to adapt this function
                            (findnearestedge) [1] to my routing data
                            that are in srs 27492.<br>
                            <br>
                            Someone can help me with that? <br>
                            <br>
                            <br>
                            thanks<br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            [1]<br>
                            <br>
                            $startEdge = findNearestEdge($startPoint);<br>
                             $endEdge   = findNearestEdge($endPoint);<br>
                            <br>
                              function findNearestEdge($lonlat) {<br>
                            <br>
                            SELECT gid, source, target, the_geom, <br>
                                              distance(the_geom,
                            GeometryFromText(<br>
                                                   'POINT(".$lonlat[0]."
                            ".$lonlat[1].")', 4326)) AS dist <br>
                                             FROM ".TABLE."  <br>
                                             WHERE the_geom &&
                            setsrid(<br>
                                                  
                            'BOX3D(".($lonlat[0]-0.1)." <br>
                                                         
                            ".($lonlat[1]-0.1).", <br>
                                                         
                            ".($lonlat[0]+0.1)." <br>
                                                         
                            ".($lonlat[1]+0.1).")'::box3d, 4326) <br>
                                             ORDER BY dist LIMIT 1"<br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            Em 10-07-2012 09:33, Daniel Kastl escreveu:<br>
                          </div>
                          <blockquote type="cite">Hi Pedro,
                            <div><br>
                            </div>
                            <div>The years before it was always
                              available on OSGeo server: <a
                                moz-do-not-send="true"
                                href="http://download.osgeo.org/pgrouting/foss4g2010/"
                                target="_blank">http://download.osgeo.org/pgrouting/foss4g2010/</a></div>
                            <div> It seems I forgot to place the 2011
                              workshop there as well. </div>
                            <div><br>
                            </div>
                            <div>The workshop documentation source is on
                              Github: <a moz-do-not-send="true"
                                href="https://github.com/pgRouting/workshop"
                                target="_blank">https://github.com/pgRouting/workshop</a></div>
                            <div>So all you're missing is the sample
                              data. But you can download any OSM data or
                              even use the sample data of 2010.</div>
                            <div><br>
                            </div>
                            <div>In case you're using Ubuntu/Debian you
                              can install last years workshop as a
                              package easily:</div>
                            <div><a moz-do-not-send="true"
                                href="https://launchpad.net/%7Egeorepublic/+archive/pgrouting/+packages"
                                target="_blank">https://launchpad.net/~georepublic/+archive/pgrouting/+packages</a></div>
                            <div>It contains the sample data of Denver
                              as well. Or you download the tarball [1]
                              and extract it. </div>
                            <div><br>
                            </div>
                            <div>Or, you use OSGeo Live DVD. It contains
                              the workshop as well:</div>
                            <div><a moz-do-not-send="true"
                                href="http://live.osgeo.org/en/quickstart/pgrouting_quickstart.html"
                                target="_blank">http://live.osgeo.org/en/quickstart/pgrouting_quickstart.html</a> (see


                              "What's next" at the end of the page).</div>
                            <div><br>
                            </div>
                            <div>Hope that helps,</div>
                            <div>Daniel</div>
                            <div><br>
                            </div>
                            <div>[1] <a moz-do-not-send="true"
href="https://launchpad.net/%7Egeorepublic/+archive/pgrouting/+files/pgrouting%2Bworkshop_0.6.1.orig.tar.gz"
                                target="_blank">https://launchpad.net/~georepublic/+archive/pgrouting/+files/pgrouting%2Bworkshop_0.6.1.orig.tar.gz</a></div>
                            <div><br>
                            </div>
                            <div><br>
                              <br>
                              <div class="gmail_quote">On Tue, Jul 10,
                                2012 at 10:15 AM, Pedro Costa <span
                                  dir="ltr"><<a
                                    moz-do-not-send="true"
                                    href="mailto:pedrocostaarma@sapo.pt"
                                    target="_blank">pedrocostaarma@sapo.pt</a>></span>
                                wrote:<br>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex">Hi guys,<br>
                                  <br>
                                  I'm playing with pgrouting workshop of
                                  FOSS4G 2011.<br>
                                  There is any link to download the
                                  workshop material?<br>
                                  <br>
                                  Thanks<br>
                                  <br>
                                  Pedro<br>
_______________________________________________<br>
                                  Pgrouting-users mailing list<br>
                                  <a moz-do-not-send="true"
                                    href="mailto:Pgrouting-users@lists.osgeo.org"
                                    target="_blank">Pgrouting-users@lists.osgeo.org</a><br>
                                  <a moz-do-not-send="true"
                                    href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users"
                                    target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
                                </blockquote>
                              </div>
                              <br>
                              <br clear="all">
                              <span><font color="#888888">
                                  <div><br>
                                  </div>
                                  -- <br>
                                  <span
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic


                                    UG & Georepublic Japan<br>
                                    eMail: <a moz-do-not-send="true"
                                      href="mailto:daniel.kastl@georepublic.de"
                                      style="color:rgb(66,99,171)"
                                      target="_blank">daniel.kastl@georepublic.de</a><br>
                                    Web: <a moz-do-not-send="true"
                                      href="http://georepublic.de/"
                                      style="color:rgb(66,99,171)"
                                      target="_blank">http://georepublic.de</a></span><br>
                                </font></span></div>
                            <span><font color="#888888"> <br>
                                <fieldset></fieldset>
                                <br>
                                <pre>_______________________________________________
Pgrouting-users mailing list
<a moz-do-not-send="true" href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a>
</pre>
                              </font></span></blockquote>
                          <br>
                          <br>
                        </div>
                        <br>
                        _______________________________________________<br>
                        Pgrouting-users mailing list<br>
                        <a moz-do-not-send="true"
                          href="mailto:Pgrouting-users@lists.osgeo.org"
                          target="_blank">Pgrouting-users@lists.osgeo.org</a><br>
                        <a moz-do-not-send="true"
                          href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users"
                          target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
                        <br>
                      </blockquote>
                    </div>
                    <br>
                    <br clear="all">
                    <div><br>
                    </div>
                    -- <br>
                    <span
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic

                      UG & Georepublic Japan<br>
                      eMail: <a moz-do-not-send="true"
                        href="mailto:daniel.kastl@georepublic.de"
                        style="color:rgb(66,99,171)" target="_blank">daniel.kastl@georepublic.de</a><br>
                      Web: <a moz-do-not-send="true"
                        href="http://georepublic.de/"
                        style="color:rgb(66,99,171)" target="_blank">http://georepublic.de</a></span><br>
                  </div>
                  <br>
                  <fieldset></fieldset>
                  <br>
                  <pre>_______________________________________________
Pgrouting-users mailing list
<a moz-do-not-send="true" href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a>
</pre>
                </blockquote>
                <br>
                <br>
              </div>
            </div>
          </div>
          <br>
          _______________________________________________<br>
          Pgrouting-users mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a><br>
          <a moz-do-not-send="true"
            href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users"
            target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <span
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic
        UG & Georepublic Japan<br>
        eMail: <a moz-do-not-send="true"
          href="mailto:daniel.kastl@georepublic.de"
          style="color:rgb(66,99,171)" target="_blank">daniel.kastl@georepublic.de</a><br>
        Web: <a moz-do-not-send="true" href="http://georepublic.de/"
          style="color:rgb(66,99,171)" target="_blank">http://georepublic.de</a></span><br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Pgrouting-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a>
</pre>
    </blockquote>
    <br>
    <br>
  </body>
</html>