JuliaEarth / GeoIO.jl

Load/save geospatial data compatible with the GeoStats.jl framework
https://github.com/JuliaEarth/GeoStats.jl
MIT License
21 stars 6 forks source link

GeoTable from NaturalEarth has wrong unit #94

Closed disberd closed 3 months ago

disberd commented 3 months ago

Hello,

I just realized that the table coming out of the output from NaturalEarth (example https://github.com/JuliaEarth/GeoArtifacts.jl#naturalearth in the Readme) creates a domain whose points are expressed in m, despite having the values which are corresponding to longitude and latitude in degrees.

image

I understand this as that is the default unit to the new Point type, but the input data from the NaturalEarth repository is in latitude/longitude in degrees so at first glance this might seem misleading.

Is this something intended or should it be fixed or made more explicit in the documentation? Is it alternatively possible to create the geometries directly using LatLon from CoordRefSystems? I just realized that you can use LatLon to generate a Point, but this would need some modification in the functions in GeoIO to specify how to handle LatLon when converting from GeoJSON.FeatureCollection to: image

juliohm commented 3 months ago

Thanks for opening the issue. This is something that we have in our roadmap: to fix the loaders in GeoIO.jl to consume the CRS metadata in the files, when available.

In other words, this is happening here because we still didn't have time to fix GeoIO.jl loaders with GIS formats. The file should load as LatLon if the geojson/shapefile/... uses geographic coordinates.

juliohm commented 3 months ago

I've transferred the issue to GeoIO.jl. PRs are welcome that fix specific loaders.

juliohm commented 3 months ago

Closing it in favor of #87