Open eliascarv opened 1 day ago
Yes we are in the middle of fixing this globally using DataAPI metadata. See:
https://github.com/JuliaGeo/GeoInterface.jl/pull/161
Maybe jump on to that issue if you have suggestions, or want to finish the PR with some tests and docs
You could also PR here to actually attach metadata to the DataFrame, followilling the standard in that PR
Got it, I'll wait for the GeoInterface PR to be merged so I can make a PR adding the CRS to the metadata.
It seems that the GeoInterface PR is already well underway, I will make the PR adding the CRS in the metadata
Yeah the standard is pretty set so feel free to add it. Loading GeoDataFrames will make this just work even now.
Regarding the other question by @eliascarv:
Perhaps returning a wrapper type that implements the Tables.jl interface would be a viable solution?
What is the reason to depend on DataFrames.jl for this package? Parquet2.Dataset
already implements the Tables interface as well. Such an approach would also be more consistent with GeoJSON.jl and Shapefile.jl right?
That sounds like a better approach to me too.
We need the metadata either way but it should be attached to the Dataset
The
GeoParquet.read
function returns aDataFrame
, which I imagine is what prevents theGI.crs
function from being implemented, as that would be type piracy. Perhaps returning a wrapper type that implements the Tables.jl interface would be a viable solution?Here is an example of a file that has CRS, but is not returned by the
GI.crs
function:Link to download the
example.parquet
file: https://github.com/opengeospatial/geoparquet/raw/v1.0.0/examples/example.parquet