WKTWriter empty point/geometrycollection WKT serialization

Open
#162 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
data

Research direction

Start at WKTWriter.toString and trace how empty Point and ShapeCollection values are serialized. Reproduce the reported outputs, then verify that empty geometries serialize as POINT EMPTY and GEOMETRYCOLLECTION EMPTY without changing non-empty WKT output.

Written by the indexing model from the issue text.

Description

bug enhancement

When putting an empty Point through WKTWriter.toString, it produces a string of the form POINT () or POINT(NaN, NaN) instead of POINT EMPTY. Similarly for an empty ShapeCollection, we get the serialization GEOMETRYCOLLECTION () instead of GEOMETRYCOLLECTION EMPTY.

Dominant language
Java
Stars
961
Forks
172
PR merge metrics
No merged PRs in 30d

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.

More from locationtech/spatial4j

All issues in locationtech/spatial4j

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.