Hi all, I'm experiencing problems querying with WFS's GetFeature layers based on shapefile with geometry with more than 2 dimensions.
My test environment: - Windows 10, Tomcat 9.0.54, Java jdk-11.0.12.7-hotspot (Adoptium by Eclipse Foundation) My test data - polygonal shapefile elaborated with ogr2ogr to produce 2D, 3D (xyz & xym) and 4D geometry (xyzm). The original shapefile was a 4D geometry coming from ESRI's applications. - ogr2ogr -dim XYZM OrigEdificiXYZM.shp EdificiXYZM.shp - ogr2ogr -dim XYZ OrigEdificiXYZM.shp EdificiXYZ.shp - ogr2ogr -dim XYM OrigEdificiXYZM.shp EdificiXYM.shp - ogr2ogr -dim XY OrigEdificiXYZM.shp EdificiXY.shp My test query: http://localhost:8089/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typeName=common:EdificiXYM&bbox=493318, 5048991, 493319, 5048992&srsName=EPSG:32632 I launched with PostMan the WFS GetFeature with a bbox filter and I got this results on different version of GeoServer: *GeoServer* *3D *(XYZ/XYM) *4D *(XYZM) *2D *(XY) 2.20.0 O O ü 2.19.3 O O ü 2.18.5 O O ü 2.17.5 O O ü 2.16.5 ü ü ü 2.16.0 ü ü ü 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 GetMap *works fine* with all types of geometries. It's clearly a GeoTools error and though I found information about this having been already solved (https://osgeo-org.atlassian.net/browse/GEOT-6599) I'm still having issues. Stefano
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users