locationtech / locationtech/jts

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

Open
#1,026 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2.2k
Forks
475
Avg merge
14d 10h
Merged PRs (30d)
1

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Coordinate.setM and PackedCoordinateSequence.getCoordinate in the supplied trace, then follow the RectangleIntersects path through the GeoTools BBOX evaluation and GeoServer WFS GetFeature entry point. Reproduce the GeoServer request if available and determine why ordinate index 3 is requested; done means the failure is understood and the corrected behavior is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.