-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GFT.val definitions for the CRS defined here #40
Conversation
Why are these not just const aliases for |
You can't dispatch on the int within an EPSG I think |
Right. I guess I'm a little worried that I think we need to define (maybe thats a separate PR though) |
All (Proj-compatible) projections can be said to have a "canonical form" which is basically what Proj accepts, so in that case maybe we add a GFT method This way people can define their own CRS structs for dispatch purposes, while still letting them be proj-compatible. By Proj-compatible, I mean expressible in WKT etc, so Albers USA would not qualify. |
Ok maybe I need to explain a little more... Most of the purpose of GFT as a package is that various geospatial data formats only allow using a specific kind of string/number for CRS (Proj/wellknowntext/epsg/etc) and by wrapping a known string or number in a wrapper type every package knows exactly what the thing is without parsing it, and is e.g. allowed to write the contents to a file. We need a My issue is not about Proj compatability at all because proj has automatic detection. Its about all the other packages that don't depend on a binary like proj/gdal being able to either know a CRS is already in the right format for them, or have an external package they don't depend on do the conversion by pirating Currently ArchGDAL is the anointed external package that does that because historically most packages that needed this depended on ArchGDAL already, but it could also just be Proj. The other packages don't even know about this, they just call But (and I also get that I wrote a bunch of the code here and never fixed this 😅 eek) Also another thought, with such specific types here, we could just include the |
Makes sense - and that should definitely go in the GFT docs! I don't mind implementing converts for these particular CRSs here, but we should then probably abstract this out to a separate package at some stage... |
Absolutely, I haven't been the best communicator with all these things
It could also just go in GFT.jl under an e.g. |
What would |
A translation to any native GFT type so that convert can just call that, otherwise you'd have to reimplement all convert functions per type (they may be one liners, but even so) |
Arent they all one-liners too ? ;) |
Well you'd have to define a convert for each separate type (EPSG, ProjJSON, ProjString, EsriWKT, KML, ...) but with a conventional/canonical form, you don't have to do that |
Sorry I don't get it... my reason to define the exact conversion is to skip needing Proj/ArchGDAL for any conversion at all, and just make them instant. The canonical version still needs those for most conversions. (Well, we wouldn't necessarily specify well-known binary, in that case and similar, using a canonical epsg would help) |
I'm not saying that we should define only the canonical conversion, just that this fallback should exist (I probably wouldn't end up implementing an explicit KML method, for example, and it could be useful for that to have an automatic fallback). |
Makes sense |
No description provided.