Details
Description
The specification method #column(int) has not been included in the interface. We can surely change the name to a more neutral get*() and indeed, so far, provide PointArray.getDirectPosition(int index, DirectPosition dp). The latter imposes all sorts of details on the implementation, for instance, the existance of a mutable DirectPosition.
We should provide a simple getDirectPosition(int index) method.
Perhaps we should also let the former method be optional by allowing it to throw an OperationNotSupported exception.
Activity
Adrian Custer
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Closed [ 6 ] |
| Resolution | Not A Bug [ 6 ] |
Martin Desruisseaux
made changes -
| Resolution | Not A Bug [ 6 ] | |
| Assignee | Martin Desruisseaux [ desruisseaux ] | |
| Status | Closed [ 6 ] | Reopened [ 4 ] |
Martin Desruisseaux
made changes -
| Status | Reopened [ 4 ] | Closed [ 6 ] |
| Resolution | Not A Bug [ 6 ] | |
| Fix Version/s | 2.2 [ 12386 ] | |
| Fix Version/s | 2.2-M1 [ 14472 ] |
PointArray.column(int)
In GeoAPI 2.0, the column association was provided through the positions() method. This method has been deprecated in 2.2 and replaced by direct inheritence of java.util.List<Position> methods.
Reference: PointArray.positions() javadoc
So PointArray.column(int) is functionality is provided by PointArray.get(int) inherited from java.util.List. However we should probably document this get method explicitly. Note that we inherit PointArray.set(int, Position) from java.util.List as well.
PointArray.getDirectPosition(int, DirectPosition)
Actually this method does not require the existence of a mutable DirectPosition. The user can pass null, in which case the method will create its own DirectPosition which doesn't need to be mutable (however it is recommanded in order to allow usage of the idiom documented in the javadoc, but I don't think that it is a problem given how trivial implementing a mutable DirectPosition is).
The getDirectPosition(int) functionality can be provided by get(int).getDirectPosition().