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

ksa ksa-nil5 at yandex.ru
Mon Sep 20 03:28:11 EDT 2004


Hi, Frank!



I have realized algorithm (on C++) calculation of distance between two
points on sphere. Accordingly proceeding from it it's possible to realize
calculation of length of linestring on sphere, and also the area of polygon
on sphere. I have these subroutines too.

I can send these subroutines to you that you have added them in OGR library.



Sergey.




> > 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.
>




More information about the Gdal-dev mailing list