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.
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.
Please open a ticket, attach a sample shapefile along with requests that make the system fail.
Hopefully it will be picked up during one of the future bug fix code sprints.
Cheers
Andrea
···
Regards,
Andrea Aime
==
GeoServer Professional Services from the experts!
Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail
Please open a ticket, attach a sample shapefile along with requests that make the system fail.
Hopefully it will be picked up during one of the future bug fix code sprints.
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.
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.
Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail