Changes between Version 1 and Version 2 of Ticket #4016


Ignore:
Timestamp:
Mar 26, 2011, 6:50:41 AM (13 years ago)
Author:
Marvin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4016 – Description

    v1 v2  
    11Hi,
    22
    3 I have noticed that reading all the points of a polygon or line feature into an array of doubles is very costly with the Java bindings, since the only way of obtaining point coordinates directly is by using the org.gdal.ogr.Geometry.GetPoint() method. This means that to obtain all points of the geometry, one has to invoke GetPoint() for each point, and at every invocation of GetPoint(), Java has to make a single access to the native GDAL/OGR library, only to get a single point. The penalty for this is very high if you are dealing with very detailed polyon or line features with many points.
     3I have noticed that reading all the points of a polygon or line feature into an array of doubles is very costly with the Java bindings, since the only way of obtaining point coordinates directly is by using the org.gdal.ogr.Geometry.GetPoint() method. This means that to obtain all points of the geometry, one has to invoke GetPoint() for each and every point, and at every invocation of GetPoint(), Java has to make a single access to the native GDAL/OGR library, only to get a single point. The penalty for this is very high if you are dealing with very detailed polyon or line features with many points.
    44
    55It would therefore be great if someone could implement the OGRLineString::getPoints() method for the Java bindings, so one can get all of a geometry's points in one single command and in one single access of the data source in an array of doubles.