<pre class="textmate-source"><pre class="sunburst">Hi All,<br>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. <br>Is my query right?<br>
<br>select o.osm_id, <span class="variable variable_other variable_other_constant variable_other_constant_ruby">ST_AsText</span>(<span class="variable variable_other variable_other_constant variable_other_constant_ruby">ST_Transform</span>(o.way,<span class="constant constant_numeric constant_numeric_ruby">4326</span>)), <span class="variable variable_other variable_other_constant variable_other_constant_ruby">ST_Length</span>(<span class="variable variable_other variable_other_constant variable_other_constant_ruby">ST_Transform</span>(o.way,<span class="constant constant_numeric constant_numeric_ruby">4326</span>))
from planet_osm_line o
where o.highway is <span class="keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby">not</span> null;


<span class="constant constant_numeric constant_numeric_ruby">26781954</span>;<span class="string string_quoted string_quoted_double string_quoted_double_ruby">"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 class="constant constant_numeric constant_numeric_ruby">0.<b>0112000095550213</b></span>

<span class="constant constant_numeric constant_numeric_ruby">26487076</span>;<span class="string string_quoted string_quoted_double string_quoted_double_ruby">"LINESTRING(12.4376603785513 55.7323555892184,12.4377151757836 55.7341099847101,12.4377174215718 55.734184081729,12.4377245182625 55.7344121883925,12.4377250572517 55.7344266536481)"</span>;<span class="constant constant_numeric constant_numeric_ruby">0.<b>00207207442718709</b></span>

<span class="constant constant_numeric constant_numeric_ruby">114383319</span>;<span class="string string_quoted string_quoted_double string_quoted_double_ruby">"LINESTRING(12.4378901676009 55.7615479714339,12.4377832680821 55.7617575712814,12.4376867890206 55.7619467509818)"</span>;<span class="constant constant_numeric constant_numeric_ruby"><b>0.</b><b>000447647154409751</b></span>
<br><br>cheers,<br>Ed<br></pre></pre>