apache / apache/sedona-db

PostGIS's `ST_GeogFromText()` can parse EWKT (i.e. `SRID=4326;...`)

Open
#464 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
503
Forks
61
Avg merge
2d 5h
Merged PRs (30d)
91

Description

I just found the argument of `ST_GeogFromText()` is EWKT, not WKT. I'm not sure if this what SedonaDB should follow, but let me file this issue before I forget...

https://postgis.net/docs/ST_GeogFromText.html

On SedonaDB, currently we get:

```
> SELECT ST_GeogFromText('SRID=4267;POINT(-77.0092 38.889588)');
Internal error: WKT parse error: Invalid type encountered.
This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues
```

Contributor guide

Open the contributing guide

Research direction

Start with the linked PostGIS ST_GeogFromText documentation and reproduce the supplied SedonaDB SQL example. Compare the expected EWKT behavior with the current WKT parse error and determine whether SedonaDB should accept the SRID-prefixed input; done means the desired behavior is agreed and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.