Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ST_EqualsIdentical returns false for a stored 2D geometry and the same geometry parsed from WKT

Closed
#3,458 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #3459 by @jiayuasu — merged

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
java, sql
Domain
data

Research direction

Start where ST_EqualsIdentical compares coordinate sequences, and where the geometry serializer reads a stored 2D geometry back as XY. Compare that with the default JTS coordinate sequence that WKT parsing produces, which carries a NaN Z ordinate. Reproduce with a stored POINT (1 2) against ST_GeomFromWKT('POINT (1 2)'), which should return true. Work is already under way in pull request #3459, so check it before starting.

Written by the indexing model from the issue text.

Description

ST_EqualsIdentical compares two coordinate sequences only when they have the same in-memory dimension. WKT parsing produces JTS default coordinate sequences, which hold ordinary 2D coordinates with a NaN Z ordinate (dimension 3), while the geometry serializer reads a stored 2D geometry back as declared XY (dimension 2). So a 2D geometry from a stored geometry column is never identical to the same geometry built in the query:

-- t.geom stores POINT (1 2)
SELECT ST_EqualsIdentical(geom, ST_GeomFromWKT('POINT (1 2)')) FROM t  -- false

The same happens for line strings, polygons and multi geometries. Comparing two stored columns, or two parsed geometries, is not affected.

Dominant language
Java
Stars
2.4k
Forks
787
Avg merge
1d 20h
Merged PRs (30d)
52

Getting set up

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 apache/sedona

All issues in apache/sedona

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.