<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 11/18/2010 03:52 PM, Ludovic Granjon wrote:
<blockquote cite="mid:4CE52F9E.2060309@u-bourgogne.fr" type="cite">Hi
all
  <br>
  <br>
I try to calculate the length of a linestring in python.
  <br>
But is there a way in python with ogr to calculate this. I see there's
a GetLength()&nbsp; in the OGRLineString Class Reference
<a class="moz-txt-link-freetext" href="http://www.gdal.org/ogr/classOGRLineString.html#7b3dc3abefd16aea17ac9fcc0ccd0010">http://www.gdal.org/ogr/classOGRLineString.html#7b3dc3abefd16aea17ac9fcc0ccd0010</a>
, but I don't see if there's the same thing in python ?
  <br>
</blockquote>
<br>
There's Length() method in the bindings for the Geometry class. It's a
simple interface to OGR_G_Length(), which calls get_Length(), which
computes the length using simple euclidian 2D length for line strings
and rings.<br>
<br>
Ari<br>
<br>
<blockquote cite="mid:4CE52F9E.2060309@u-bourgogne.fr" type="cite"><br>
Thanks
  <br>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
<br>
</body>
</html>