[Geoserver-devel] [JIRA] (GEOS-10290) WFS GetFeature raises error when querying layers built on 3/4 dimensional shapefiles

Stefano Pezzi created an issue

GeoServer / BugGEOS-10290

WFS GetFeature raises error when querying layers built on 3/4 dimensional shapefiles

Issue Type:

BugBug

Affects Versions:

2.17.5, 2.18.5, 2.19.3, 2.20.0

Assignee:

Unassigned

Attachments:

ticketGEOS.zip

Created:

28/Oct/21 3:45 PM

Environment:

Windows 10, Tomcat 9.0.54, Java jdk-11.0.12.7-hotspot (Adoptium by Eclipse Foundation)

Priority:

MediumMedium

Reporter:

Stefano Pezzi

The WFS’s request GetFeature fails when querying layer defined on shapefile that have more than 2 dimensions.

The XYZM and XYZ test cases give the same error “Invalid ordinate index: 3.”
Excerpt from logfile:
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)

The XYM test case gives an “Index 69 out of bounds for length 69”
Excerpt from logfile:
java.lang.ArrayIndexOutOfBoundsException: Index 69 out of bounds for length 69
at org.geotools.geometry.jts.LiteCoordinateSequence.setOrdinate(LiteCoordinateSequence.java:224)
at org.geotools.data.shapefile.shp.PolygonHandler.readCoordinates(PolygonHandler.java:315)
at org.geotools.data.shapefile.shp.PolygonHandler.read(PolygonHandler.java:142)
at org.geotools.data.shapefile.shp.ShapefileReader$Record.shape(ShapefileReader.java:114)
at org.geotools.data.shapefile.ShapefileFeatureReader.getGeometry(ShapefileFeatureReader.java:239)
at org.geotools.data.shapefile.IndexedShapefileFeatureReader.hasNext(IndexedShapefileFeatureReader.java:86)
at org.geotools.data.ReTypeFeatureReader.hasNext(ReTypeFeatureReader.java:191)
at org.geotools.data.MaxFeatureReader.hasNext(MaxFeatureReader.java:82)

WMS’s GetMap and GetFeatureInfo work fine, but we had some problems with simple WPS’s processes that are probably linked to the same issue.

Attached are 4 shapefile with MultiPolygon, MultiPolygonZ, MultiPolygonM and MultiPolygonZM geometries respectively and a text file with the CURLed WFS GetFeatures. ticketGEOS.zip

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100183-sha1:4a12dee)

Atlassian logo