duckdb / duckdb/duckdb-spatial
CRS display for unidentifiable CRS is verbose
- Dominant language
- C
- Stars
- 708
- Forks
- 96
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 5
Description
We chatted a bit about this in the CRS issue but I thought I'd leave the reprex I was thinking about. This CRS is "unidentifiable" because it's a compound CRS (NAD83/UTM Zone 20N plus a vertical CRS). This is probably not all that common but it does happen to be part of the test data I use most frequently (https://geoarrow.org/data) and because I happened to live in Nova Scotia at the time I made the data.
In SedonaDB I chose to display "geometry" without parameters in the table and abbreviate the schema to "{...}" if it couldn't be identified.
There also might be an assumption in the table printer that the type will be short and it might be worth limiting that to at minimum one screen width (I think this output is a few kilobytes wide!)
```python
import sedona.db
sd = sedona.db.connect()
sd.options.interactive = True
url = "https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-point.parquet"
sd.read_parquet(url).limit(1)
#> ┌──────────┬───────────┬─────────┬──────────┬──────────┬────────┬─────────────────┬────────────────┐
#> │ OBJECTID ┆ FEAT_CODE ┆ ZVALUE ┆ PT_CLASS ┆ NAMEID_1 ┆ NAME_1 ┆ HID ┆ geometry │
#> │ int64 ┆ utf8 ┆ float64 ┆ int32 ┆ utf8 ┆ utf8 ┆ utf8 ┆ geometry │
#> ╞══════════╪═══════════╪═════════╪══════════╪══════════╪════════╪═════════════════╪════════════════╡
#> │ 1055 ┆ WARK60 ┆ -0.5 ┆ 4 ┆ ┆ ┆ 252C345D59374D… ┆ POINT Z(25897… │
#> └──────────┴───────────┴─────────┴──────────┴──────────┴────────┴─────────────────┴────────────────┘
sd.read_parquet(url).schema
#> SedonaSchema with 8 fields:
#> OBJECTID: int64
#> FEAT_CODE: utf8
#> ZVALUE: float64
#> PT_CLASS: int32
#> NAMEID_1: utf8
#> NAME_1: utf8
#> HID: utf8
#> geometry: geometry
import duckdb
duckdb.load_extension("spatial")
duckdb.read_parquet(url).limit(1)
#> ┌──────────┬───────────┬────────┬──────────┬──────────┬─────────┬──────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
#> │ OBJECTID │ FEAT_CODE │ ZVALUE │ PT_CLASS │ NAMEID_1 │ NAME_1 │ HID │ geometry │
#> │ int64 │ varchar │ double │ int32 │ varchar │ varchar │ varchar │ geometry('{"$schema":"https://proj.org/schemas/v0.7/projjson.schema.json","type":"compoundcrs","name":"nad_1983_csrs_2010_utm_20_nova_scotia + cgvd2013(cgg2013) height","components":[{"type":"projectedcrs","name":"nad_1983_csrs_2010_utm_20_nova_scotia","base_crs":{"name":"gcs_north_american_1983_csrs_2010","datum":{"type":"geodeticreferenceframe","name":"nad83 canadian spatial reference system","ellipsoid":{"name":"grs 1980","semi_major_axis":6378137,"inverse_flattening":298.257222101},"id":{"authority":"epsg","code":6140}},"coordinate_system":{"subtype":"ellipsoidal","axis":[{"name":"longitude","abbreviation":"lon","direction":"east","unit":{"type":"angularunit","name":"degree","conversion_factor":0.0174532925199433}},{"name":"latitude","abbreviation":"lat","direction":"north","unit":{"type":"angularunit","name":"degree","conversion_factor":0.0174532925199433}}]}},"conversion":{"name":"utm zone 20n","method":{"name":"transverse mercator","id":{"authority":"epsg","code":9807}},"parameters":[{"name":"latitude of natural origin","value":0,"unit":{"type":"angularunit","name":"degree","conversion_factor":0.0174532925199433},"id":{"authority":"epsg","code":8801}},{"name":"longitude of natural origin","value":-63,"unit":{"type":"angularunit","name":"degree","conversion_factor":0.0174532925199433},"id":{"authority":"epsg","code":8802}},{"name":"scale factor at natural origin","value":0.9996,"unit":"unity","id":{"authority":"epsg","code":8805}},{"name":"false easting","value":500000,"unit":"metre","id":{"authority":"epsg","code":8806}},{"name":"false northing","value":0,"unit":"metre","id":{"authority":"epsg","code":8807}}],"id":{"authority":"epsg","code":16020}},"coordinate_system":{"subtype":"cartesian","axis":[{"name":"easting","abbreviation":"e","direction":"east","unit":"metre"},{"name":"northing","abbreviation":"n","direction":"north","unit":"metre"}]}},{"type":"verticalcrs","name":"cgvd2013(cgg2013) height","datum":{"type":"verticalreferenceframe","name":"canadian geodetic vertical datum of 2013 (cgg2013)"},"coordinate_system":{"subtype":"vertical","axis":[{"name":"gravity-related height","abbreviation":"h","direction":"up","unit":"metre"}]}}]}') │
#> ├──────────┼───────────┼────────┼──────────┼──────────┼─────────┼──────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
#> │ 1055 │ WARK60 │ -0.5 │ 4 │ NULL │ NULL │ 252C345D59374DDAB3C3C612C8CA43AA │ POINT Z (258976.3273 4820275.6807 -0.5) │
#> └──────────┴───────────┴────────┴──────────┴──────────┴─────────┴──────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.