[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] Which length function should be used for linestrings
From:       Raghavan Krishnasamylakshmanaperumal <rkrish20 () uic ! edu>
Date:       2014-04-21 16:25:37
Message-ID: CAHqpA3npTit1_O4L3ww3udwG=FOD0kWi6fnNnhtJz7j3rNxVag () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks Steve, then I hope ST_Length on the spheroid will be suitable for my
purpose.

Thanks,
Raghavan


On Mon, Apr 21, 2014 at 11:07 AM, Stephen Woodbridge <
woodbri@swoodbridge.com> wrote:

> On 4/21/2014 11:25 AM, Raghavan Krishnasamylakshmanaperumal wrote:
>
>> Hi All,
>>
>> I am trying to make use of linestring's length for one of my route
>> detection experiment.
>>
>> My linestring data is in this format
>> "the_geom geometry(LineString,4326)"
>>
>> I tried using ST_Length(the_geom), ST_Length(the_geom,true) and the
>> results are as follows,
>>
>>     */the_geom geometry(LineString,4326)/*
>>       "0102000020E6100000030000008204C58F31C551C070AC8BDB682C4540DA
>> 1B7C6132C551C0BF7D1D38672C45403333333333C551C00D4FAF94652C4540"
>>
>>     /*ST_Length(the_geom)
>>     */0.000141421356226931
>>
>>     *ST_Length(the_geom,true) *i.e spheroid=true
>>
>>     13.8305487635736
>>
>>
>>
>> What is the metric used for these st_length values? Also if I want to
>> use length as my edge cost in a graph formed out of these linestrings
>> which length function I should use?
>>
>
> ST_Length() returns the distance is the object units. In 4326 this would
> be degrees
>
> ST_Length on the spheriod is probably in meters.
>
> -Steve
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>

[Attachment #5 (text/html)]

<div dir="ltr">Thanks Steve, then I hope  <span \
style="font-family:arial,sans-serif;font-size:13px">ST_Length on the  </span><span \
style="font-family:arial,sans-serif;font-size:13px">spheroid</span><span \
style="font-family:arial,sans-serif;font-size:13px">  will be suitable for my \
purpose.</span><div>

<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span \
style="font-family:arial,sans-serif;font-size:13px">Thanks,<br>Raghavan</span></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">

On Mon, Apr 21, 2014 at 11:07 AM, Stephen Woodbridge <span dir="ltr">&lt;<a \
href="mailto:woodbri@swoodbridge.com" \
target="_blank">woodbri@swoodbridge.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div class="">On 4/21/2014 11:25 AM, Raghavan Krishnasamylakshmanaperumal wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div \
class=""> Hi All,<br>
<br>
I am trying to make use of linestring&#39;s length for one of my route<br>
detection experiment.<br>
<br>
My linestring data is in this format<br>
&quot;the_geom geometry(LineString,4326)&quot;<br>
<br>
I tried using ST_Length(the_geom), ST_Length(the_geom,true) and the<br>
results are as follows,<br>
<br></div>
      */the_geom geometry(LineString,4326)/*<br>
         &quot;<u></u>0102000020E6100000030000008204<u></u>C58F31C551C070AC8BDB682C454 \
0DA<u></u>1B7C6132C551C0BF7D1D38672C4540<u></u>3333333333C551C00D4FAF94652C45<u></u>40&quot;<br>
 <br>
      /*ST_Length(the_geom)<br>
      */0.000141421356226931<br>
<br>
      *ST_Length(the_geom,true) *i.e spheroid=true<div class=""><br>
      13.8305487635736<br>
<br>
<br>
<br>
What is the metric used for these st_length values? Also if I want to<br>
use length as my edge cost in a graph formed out of these linestrings<br>
which length function I should use?<br>
</div></blockquote>
<br>
ST_Length() returns the distance is the object units. In 4326 this would be \
degrees<br> <br>
ST_Length on the spheriod is probably in meters.<br>
<br>
-Steve<br>
<br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" \
target="_blank">postgis-users@lists.osgeo.org</a><br> <a \
href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" \
target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
 </blockquote></div><br><br>
</div></div>



_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic