Changes between Initial Version and Version 1 of Ticket #4016

Show
Ignore:
Timestamp:
03/26/11 06:50:10 (4 years ago)
Author:
Marvin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4016 – description

    initial v1  
    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(), 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 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.