[gdal-dev] OGR question on geometric computations

Ari Jolma ari.jolma at tkk.fi
Thu Mar 12 16:52:04 EDT 2009


Adriano,

These questions seem to be specifically about GEOS functionality, which 
OGR provides (and in your case you use them from Perl) but neither OGR 
nor Perl really matter in this case. I'm not such an expert on GEOS that 
I dare to answer, I suggest you check first GEOS documentation and then 
perhaps GEOS email list - or that of JTS, as GEOS is a C++ port of JTS, 
which is "the mother". Start from http://trac.osgeo.org/geos/

Cheers,

Ari

Adriano Ferreira kirjoitti:
> Hi, I am working with GDAL Swig interface to Perl and have a doubt I
> could not resolve by myself from what I read up to now. (Warning: This
> is a newbye question.)
>
> I am working with polygons defined with lat/long points according to
> NAD83 (more specifically, EPSG:4269 as SRS). I need to do some
> computations with them and also with points given as input. The
> GDAL/OGR methods like Contains, Overlaps, etc. are pretty handy and
> easy to use. But what geometry does it use? Does it make difference?
>
> I am not sure that in set operations like Contains, Overlaps, etc. it
> does make difference if a simple Euclidian geometry used in the (lat,
> long) pairs will give me a different answer than if using a geometry
> over the spherical approximation of the Earth. And I think it does not
> (though I should re-read some math books before taking it for sure :-)
> ).
>
> But my concern is with the Distance method. What does it compute?
> Euclidean distance? It can compute great circle distance if I use the
> correct Spatial Reference objects with the OGR objects?
>
> I am not sure this question is clear: but as an example, given an
> polygon "P" built of (lat, long) points (given in degrees) and a a
> point "pt", the return of
>
>        P.Distance(pt)
>
> is just the length of the minimum Euclidean length between the polygon
> points and "pt"?
>
> Thanks for any help.
>
> Adriano Ferreira
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>   


-- 
Prof. Ari Jolma
Environmental Management Information Technology
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 4511 address: POBox 5300, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://geoinformatics.tkk.fi



More information about the gdal-dev mailing list