Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to use GeoServer and it seems the error comes back to Coordinate.setM #1026

Open
djzielin opened this issue Dec 6, 2023 · 2 comments

Comments

@djzielin
Copy link

djzielin commented Dec 6, 2023

Here is the trace.

java.lang.IllegalArgumentException: Invalid ordinate index: 3
at org.locationtech.jts.geom.Coordinate.setM(Coordinate.java:218)
at org.locationtech.jts.geom.impl.PackedCoordinateSequence.getCoordinate(PackedCoordinateSequence.java:116)
at org.locationtech.jts.operation.predicate.RectangleIntersectsSegmentVisitor.checkIntersectionWithSegments(RectangleIntersects.java:327)
at org.locationtech.jts.operation.predicate.RectangleIntersectsSegmentVisitor.checkIntersectionWithLineStrings(RectangleIntersects.java:317)
at org.locationtech.jts.operation.predicate.RectangleIntersectsSegmentVisitor.visit(RectangleIntersects.java:310)
at org.locationtech.jts.geom.util.ShortCircuitedGeometryVisitor.applyTo(ShortCircuitedGeometryVisitor.java:35)
at org.locationtech.jts.operation.predicate.RectangleIntersects.intersects(RectangleIntersects.java:110)
at org.locationtech.jts.operation.predicate.RectangleIntersects.intersects(RectangleIntersects.java:58)
at org.locationtech.jts.geom.Geometry.intersects(Geometry.java:754)
at org.geotools.filter.spatial.BBOXImpl.basicEvaluate(BBOXImpl.java:118)
at org.geotools.filter.spatial.BBOXImpl.evaluateInternal(BBOXImpl.java:107)
at org.geotools.filter.GeometryFilterImpl.evaluate(GeometryFilterImpl.java:217)
at org.geotools.data.shapefile.ShapefileFeatureReader.buildFeature(ShapefileFeatureReader.java:263)
at org.geotools.data.shapefile.IndexedShapefileFeatureReader.hasNext(IndexedShapefileFeatureReader.java:100)
at org.geotools.data.ReTypeFeatureReader.hasNext(ReTypeFeatureReader.java:191)
at org.geotools.data.MaxFeatureReader.hasNext(MaxFeatureReader.java:82)
at org.geotools.data.store.ContentFeatureCollection.size(ContentFeatureCollection.java:241)
at org.geotools.data.crs.ReprojectFeatureResults.size(ReprojectFeatureResults.java:107)
at org.geotools.feature.collection.DecoratingFeatureCollection.size(DecoratingFeatureCollection.java:113)
at org.geoserver.wfs.GetFeature.run(GetFeature.java:540)

@dr-jts
Copy link
Contributor

dr-jts commented Dec 6, 2023

This looks like it might be a GeoServer bug, not a JTS bug. Based on:

https://gis.stackexchange.com/questions/362671/geoserver-2-17-added-shapefile-with-geometry-of-type-3d-polygon-rendering-f
https://osgeo-org.atlassian.net/browse/GEOT-6599

From that last ticket it sounds like GeoServer is creating a PackedCoordinateSequence with dimensions = 2 and measures = 1. This is an error (dimensions should be at least 3). JTS does have a sanity check for this - not sure why that is not triggered in this case.

@jodygarnett
Copy link
Contributor

jodygarnett commented Aug 23, 2024

Is it worth closing these bugs against downstream software? GEOT-6599 is now closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants