Opened 13 years ago

Last modified 13 years ago

#4016 closed enhancement

Implement OGRLineString::getPoints() method for the Java bindings — at Version 3

Reported by: Marvin Owned by: Even Rouault
Priority: high Milestone: 1.9.0
Component: SWIG (all bindings) Version: unspecified
Severity: normal Keywords: getPoints() Java bindings
Cc:

Description (last modified by Marvin)

Hi,

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().

Thanks Marvin

Change History (3)

comment:1 by Marvin, 13 years ago

Description: modified (diff)

comment:2 by Marvin, 13 years ago

Description: modified (diff)

comment:3 by Marvin, 13 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.