[Gdal-dev] OGRPolygon::get_Area() and OGRLineString::get_Length() question

Frank Warmerdam warmerdam at pobox.com
Fri Sep 17 09:38:31 EDT 2004


ksa wrote:
> Hi, Frank!
> 
> 
> 
> Method OGRLineString::get_Length() calculates length of the LineString on a
> plane. Why on a plane? Whether it is planned to calculate length LineString
> on elipsoid?

Sergey,

Well, the obvious reason why it is calculated on a plane is that is much easier
and it is the answer that *I* would normally want if I needed the length of
a line string.

I have no plans to compute length on the ellipsoid.

I looked at GEOS quickly, and it seems to just return the planar length for
linestrings.

> Other question: whether it is planned to realize in the near future method
> OGRPolygon:: getArea ()?

Hmm, good point.  Computing planar area of a polygon is not rocket science
and I have done it in lots of other places.  I will look at implementing it
today.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list