-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
This method:
public static final int getCoordSequenceDim(CoordinateSequence coords) {
if (coords == null || coords.size() == 0)
return 0;
// JTS has a really strange way to handle dimensions!
// Just have a look at PackedCoordinateSequence and
// CoordinateArraySequence
int dimensions = coords.getDimension();
if (dimensions == 3) {
// CoordinateArraySequence will always return 3, so we have to
// check, if
// the third ordinate contains NaN, then the geom is actually
// 2-dimensional
return Double.isNaN(coords.getOrdinate(0, CoordinateSequence.Z)) ? 2 : 3;
} else {
return dimensions;
}
}
will check for a Z dimension but not the M dimension which is used, for example, in pgMapMatching
Nothing in here has changed inyears. What's the status if i do a pull request?
Metadata
Metadata
Assignees
Labels
No labels