jts icon indicating copy to clipboard operation
jts copied to clipboard

WKTReader adds dimension in default mode

Open FObermaier opened this issue 3 years ago • 0 comments

The WKTReader silently adds a dimension to 2D WKT when isOldJtsCoordinateSyntaxAllowed = true. This is the default.

Point pt = new WKTReader().read("POINT (10 10)");
if (pt.getCoordinateSequence().getDimension() == 3)
        System.out.println("dimension silently added");

The effect is the same for the other geometry types. Is this by design or do you care for a PR?

FObermaier avatar Feb 17 '22 12:02 FObermaier