Re: [gdal-dev] OGRGeometry Distance

2009-09-23 Thread Mateusz Loskot
Christopher Barker wrote: Yilmaz Arslanoglu wrote: I wanted to compute the distance between two points, you need to be clear by what you mean here: I suspect you mean: "The shortest distance between two points following the surface of the earth" In which case, what you are looking for is r

Re: [gdal-dev] OGRGeometry Distance

2009-09-22 Thread Yilmaz Arslanoglu
Thanks very much for the answer, Frank. Best wishes, Yilmaz On Mon, Sep 21, 2009 at 10:12 PM, Frank Warmerdam wrote: > Yilmaz Arslanoglu wrote: >> >> Also, as another related question, I query the DEPCNT  layer in one of >> my ENC files, and it has a geospatial reference. >> However, the points

Re: [gdal-dev] OGRGeometry Distance

2009-09-22 Thread Yilmaz Arslanoglu
Hi Even; Thank you very much for your help. Regards, Yilmaz On Mon, Sep 21, 2009 at 9:37 PM, Even Rouault wrote: > Selon Christopher Barker : > > I'd note that in the OGR XPlane driver, a function is available to compute the > distance on the spheroid. You could use it if you don't need much ac

Re: [gdal-dev] OGRGeometry Distance

2009-09-21 Thread Frank Warmerdam
Yilmaz Arslanoglu wrote: Also, as another related question, I query the DEPCNT layer in one of my ENC files, and it has a geospatial reference. However, the points on the line string features themselves return NULL when they are queried with getSpatialReference(). Aren't they expected to return

Re: [gdal-dev] OGRGeometry Distance

2009-09-21 Thread Even Rouault
Selon Christopher Barker : I'd note that in the OGR XPlane driver, a function is available to compute the distance on the spheroid. You could use it if you don't need much accuracy : http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/xplane/ogr_xplane_geo_utils.cpp (It's an internal fu

Re: [gdal-dev] OGRGeometry Distance

2009-09-21 Thread Christopher Barker
Yilmaz Arslanoglu wrote: I wanted to compute the distance between two points, you need to be clear by what you mean here: I suspect you mean: "The shortest distance between two points following the surface of the earth" In which case, what you are looking for is referred to as the geodesic

[gdal-dev] OGRGeometry Distance

2009-09-21 Thread Yilmaz Arslanoglu
Hi all; I wanted to compute the distance between two points, and for this reason I tried the "OGRGeometry::Distance" member function. However, I saw that this function only returns the linear distance between the objects, regardless of their geospatial reference. (as it is also stated somewhere o