<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    What you wrote did also a cast to geography. You should take
    Nicklas' advise as it is much more easy to read, and probably more
    efficient.<br>
    <br>
    Denis<br>
    <br>
    <br>
    On 03/22/2012 11:42 AM, Ed Linde wrote:
    <blockquote
cite="mid:CAK4dkcWgOedSFe3OCDGTBqDF6A-C5R+-ZqOxCKnvEGeLnmPb-Q@mail.gmail.com"
      type="cite">I think I fixed it using the following: Maybe someone
      can confirm its ok? <br>
      <br>
      select     o.osm_id, <br>
          ST_AsText(ST_Transform(o.way,4326)), <br>
          ST_Length( ST_GeographyFromText(
      ST_AsText(ST_Transform(o.way,4326))))<br>
      from     planet_osm_line o<br>
      where     o.highway is not null;<br>
      <br>
      <br>
      <br>
      <div class="gmail_quote">On Thu, Mar 22, 2012 at 11:35 AM, Ed
        Linde <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:edolinde@gmail.com">edolinde@gmail.com</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a
          feeling that these could be lat/long degrees differences...
          but is there a way to get the length of the road segments in
          meters please?
          <div class="HOEnZb">
            <div class="h5"><br>
              <br>
              <div class="gmail_quote">On Thu, Mar 22, 2012 at 11:32 AM,
                Ed Linde <span dir="ltr"><<a moz-do-not-send="true"
                    href="mailto:edolinde@gmail.com" target="_blank">edolinde@gmail.com</a>></span>
                wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <pre><pre>Hi All,
Am trying to measure the length of road segments from OSM (open street map) and getting some weird values. Is this in meters? If so its too small. 


Is my query right?


select o.osm_id, <span>ST_AsText</span>(<span>ST_Transform</span>(o.way,<span>4326</span>)), <span>ST_Length</span>(<span>ST_Transform</span>(o.way,<span>4326</span>))
from planet_osm_line o
where o.highway is <span>not</span> null;


<span>26781954</span>;<span>"LINESTRING(12.4488377563054 55.7052298677097,12.4475093276633 55.7050849548856,12.4459445522699 55.7049392822841,12.444526741257 55.7048546522258,12.4432355926991 55.7048141593102,12.4415570905907 55.7047361597132,12.439932936557 55.7046743571964,12.4383072553874 55.7046393812816,12.4376592107414 55.704619792731)"</span>;<span>0.<b>0112000095550213</b></span>

<span>26487076</span>;<span>"LINESTRING(12.4376603785513 55.7323555892184,12.4377151757836 55.7341099847101,12.4377174215718 55.734184081729,12.4377245182625 55.7344121883925,12.4377250572517 55.7344266536481)"</span>;<span>0.<b>00207207442718709</b></span>

<span>114383319</span>;<span>"LINESTRING(12.4378901676009 55.7615479714339,12.4377832680821 55.7617575712814,12.4376867890206 55.7619467509818)"</span>;<span><b>0.</b><b>000447647154409751</b></span>


cheers,
Ed
</pre></pre>
                </blockquote>
              </div>
              <br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
    </blockquote>
  </body>
</html>