MakieOrg / GeoMakie.jl

Geographical plotting utilities for Makie.jl
https://geo.makie.org
MIT License
171 stars 25 forks source link

Projections and GeoFormatTypes #74

Open rafaqz opened 3 years ago

rafaqz commented 3 years ago

JuliaGeo has:

https://github.com/JuliaGeo/GeoFormatTypes.jl

It integrates with ArchGDAL for conversion between projection formats using convert and reprojection of points in any projection format using ArchGDAL.reproject. It handles well known text, proj, epsg, gml and other projection formats without the handling package having to know what they are.

It would be good if we could somehow integrate projections between these packages so that e.g. EPSG projections can be used here.

I'm looking to integrate this with GeoData.jl plotting at some stage. Currently I guess everything could be converted to GeoFormatTypes.ProjString using convert and rewrapped as Projection here? But it might be nice if any projection format just worked.

visr commented 3 years ago

I think most of the projection code here can be removed once https://github.com/JuliaGeo/Proj4.jl/pull/51 lands. Would Proj4.jl not also be the place to add GeoFormatTypes.jl support, like was done in ArchGDAL? Would be nice if only a PROJ dependency would be sufficient for most of these conversions. Although GDAL supports a few more formats still I believe.

rafaqz commented 3 years ago

Probably is! I just saw all the crs types defined here too. But better to support it at a lower level.

Currently ArchGDAL does belessed type-piracy on convert to allow e.g converting EPSG to WellKnownText. We may need a Plots.jl-like backend system to allow using both.

asinghvi17 commented 1 year ago

Converting to GFT.ProjString should work here, would be a simple enough change. Will look into that after the larger refactor is complete :D

visr commented 1 year ago

It's worth noting that Proj.jl now depends on and accepts GeoFormatTypes since https://github.com/JuliaGeo/Proj.jl/pull/74.

asinghvi17 commented 5 months ago

207 begins the path to adding this integration, as I recall.

asinghvi17 commented 5 months ago

It should currently support EPSG, Proj-string, Proj-JSON, and WKT natively. I do still need to add tests though :D