We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
On version 1.17.1.
Since #513 was merged, a MultiLineString cannot be reversed if it only contains a single LineString.
The following is a minimal example:
GeometryFactory f = new GeometryFactory(); Coordinate[] coordinates = new Coordinate[2]; coordinates[0] = new Coordinate(1,1); coordinates[1] = new Coordinate(2,2); LineString[] lineStrings = new LineString[1]; lineStrings[0] = f.createLineString(coordinates); MultiLineString multiLineString = f.createMultiLineString(lineStrings); multiLineString.reverse();
This results in the following ClassCastException:
java.lang.ClassCastException: class org.locationtech.jts.geom.LineString cannot be cast to class org.locationtech.jts.geom.GeometryCollection
The text was updated successfully, but these errors were encountered:
Good find. And there are other bugs too - for instance, CoordinateSequences.reverse doesn't handle zero-length sequences.
CoordinateSequences.reverse
Working on a fix -with a more complete set of test data!
Sorry, something went wrong.
dr-jts
Successfully merging a pull request may close this issue.
On version 1.17.1.
Since #513 was merged, a MultiLineString cannot be reversed if it only contains a single LineString.
The following is a minimal example:
This results in the following ClassCastException:
The text was updated successfully, but these errors were encountered: