[gdal-dev] GDAL/OGR Java bindings very slow in reading point coordinates of feature geometries

MarvinCO marvin.offiah at googlemail.com
Fri Mar 25 19:14:35 EDT 2011


I have noticed that copying all points of a polygon (of a polygon
feature) can be very costly in my implementation. This must be due to
the fact that there is only one method for doing this:

org.gdal.ogr.Geometry.GetPoint()

This means that at every invocation of GetPoint, Java has to make a
single access to the native GDAL/OGR library, only to get a single
point.

I cannot imagine that the original C++ version of GDAL/OGR does not
provide methods for reading points much faster, e.g. something like
GetPoints() to read all points of the polygon in one single command
into an array of doubles.

I mean, why else are the points read much faster if I read them, e.g.
with Quantum GIS, which uses the original C++ GDAL/OGR?

Are such methods simply missing in the Java bindings? Or what else
could one do to speed this up?

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GDAL-OGR-Java-bindings-very-slow-in-reading-point-coordinates-of-feature-geometries-tp6209461p6209461.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list