[postgis-users] st_length problem

Ed Linde edolinde at gmail.com
Thu Mar 22 03:32:00 PDT 2012


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, ST_AsText(ST_Transform(o.way,4326)),
ST_Length(ST_Transform(o.way,4326))
from planet_osm_line o
where o.highway is not null;

26781954;"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)";0.*0112000095550213*
26487076;"LINESTRING(12.4376603785513
55.7323555892184,12.4377151757836 55.7341099847101,12.4377174215718
55.734184081729,12.4377245182625 55.7344121883925,12.4377250572517
55.7344266536481)";0.*00207207442718709*
114383319;"LINESTRING(12.4378901676009
55.7615479714339,12.4377832680821 55.7617575712814,12.4376867890206
55.7619467509818)";*0.**000447647154409751*

cheers,
Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120322/ddf78ef4/attachment.html>


More information about the postgis-users mailing list