paleolimbot opened a new issue, #187:
URL: https://github.com/apache/sedona-db/issues/187
In GeoArrow (and thus our geometry/geography types), we can and do use
authority:code CRSes. Before we write to GeoParquet, we need to resolve that
CRS into PROJJSON. I'd thought that when I first wrote that code it would
reject non-JSON but this was not the case!
This doesn't affect CRSes that were derived from GeoPandas, which were
PROJJSON already.
```python
import json
from pyarrow import parquet
import sedona.db
sd = sedona.db.connect()
sd.sql("SELECT ST_SetSRID(ST_Point(0, 1), 26920) as
geom").to_parquet("foofy.parquet")
geo = parquet.ParquetFile("foofy.parquet").metadata.metadata[b"geo"]
json.loads(geo)["columns"]["geom"]
#> {'encoding': 'WKB', 'geometry_types': [], 'crs': 'EPSG:26920'}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]