Implement OGRLineString::getPoints() method for the Java bindings
|Reported by:||Marvin||Owned by:||Even Rouault|
|Component:||SWIG (all bindings)||Version:||unspecified|
|Severity:||normal||Keywords:||getPoints() Java bindings|
Description (last modified by )
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 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 polygon or line features with many points.
It 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.
Currently, one can only use the workaround of parsing the Wkb representation obtained by Geometry.ExportToWkb().
Change History (11)
comment:4 by , 11 years ago
|Component:||JavaBindings → SWIG (all bindings)|
|Status:||new → closed|