Closed evetion closed 1 year ago
@rafaqz does 👍🏻 == approval
, so merge?
I prob should review, Ive just been at a conference all week and havent had time.
Thumbs up is "cool, good idea"
I'm wondering about the additional type complexity of this, and if just swapping to holding a string is better?
Well holding, constructing and parsing the string will be slower, I do really like the API of EPSG(4326).
Have you seen drawbacks for this type complexity? It seems nothing compared to our more complex ones, be it Rasters or GeoInterface wrappers. And its the same as our GeoJSON{T} or GML{X} structs?
I've also considered having an EPSG2 struct, or changing the field to Union{Int, NTuple{Int}}, but arrived at the current solution.
Bump? :)
Mostly I was worried that this is used inside Rasters and GeoInterface objects so it blows everything up a bit. But its not really by much I guess
It's very common to supply codes like EPSG:4326+3855 for commandline tools like gdalwarp. It means, use a horizontal crs of WGS84 (4326) and a vertical crs of EGM2008 (3855).
However, one cannot construct such a compound crs from scratch easily in JuliaGeo, as one needs to construct a valid Proj4 string with an operation like
geoidgrids=grid.gtx
.This PR introduces
N
dimensionality to theEPSG
struct, so we can doEPSG(4326, 3855)
but makes sure that forEPSG{1}
the behaviour is backwards compatible. Methods like ArchGDAL callval(::EPSG)
, and expect anInt
, so usingEPSG{2}
will result in a MethodError.Related to: https://github.com/yeesian/ArchGDAL.jl/pull/372, which introduces a method to actually parse EPSG:4326+3855 directly. After that and this PR are merged, we can introduce another PR at ArchGDAL to use the new method with
EPSG{2}
.