ST_EqualsIdentical returns false for a stored 2D geometry and the same geometry parsed from WKT
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
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/sedona
-
ST_AddMeasure assigns incorrect measures on bent lines and MultiLineStringsPossibly taken @vera-rubin claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
apache/sedona#3429 · 1 comment ·
Maintainers usually reply within 1 day
-
Clearing NoData on one raster band changes another band's MapAlgebra resultsMay be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
apache/sedona#3324 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
apache/rocketmq-dashboard#6872 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ADORSYS-GIS/token-status-link#168 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ADORSYS-GIS/keycloak-oid4vp-plugin#232 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
devops-thiago/ThrillhouseBot#1132 ·
Maintainers usually reply within 1 day