Skip to content

Fix WKTWriter invalid dimensional EMPTY tokens for nested empty geometries - #1225

Open
arimu1 wants to merge 1 commit into
locationtech:masterfrom
arimu1:fix/wkt-writer-empty-dimensional-tokens
Open

Fix WKTWriter invalid dimensional EMPTY tokens for nested empty geometries#1225
arimu1 wants to merge 1 commit into
locationtech:masterfrom
arimu1:fix/wkt-writer-empty-dimensional-tokens

Conversation

@arimu1

@arimu1 arimu1 commented Aug 13, 2026

Copy link
Copy Markdown

Summary

  • Fix WKTWriter so dimensional empty geometries emit separate Z/M/ZM and EMPTY tokens (e.g. MULTILINESTRING Z EMPTY) instead of invalid concatenated tokens like ZEMPTY, MEMPTY, or ZMEMPTY.
  • Add regression tests covering nested empty Z, M, and ZM geometries with writer-to-reader round trips.

Fixes #1223

Test plan

  • mvn -pl modules/core -Dtest=WKTWriterTest test — 15 tests, 0 failures
  • mvn -pl modules/core -Dtest=WKTReadWriteTest,WKTWriterTest,WKTWriterStaticFnTest test — 32 tests, 0 failures

Labels

  • bug
  • jts-core

Contributor notes

  • Eclipse ECA signed for 19286898+arimu1@users.noreply.github.com
  • Commit signed off with -s

Made with Cursor

…ries

When writing empty geometries with Z, M, or ZM ordinates, ensure the
dimension marker and EMPTY are separate tokens so WKTReader can round-trip
the output. Add regression tests for nested empty Z, M, and ZM cases.
Fixes locationtech#1223
Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WKTWriter emits invalid dimensional EMPTY tokens for nested empty geometries

2 participants