-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create a Proj4 configuration object #7
Comments
This was PR #8 |
Now, taking this one step further, this Proj4 configuration parser is just an instance of a more general geographic reference configuration. The data comes from a Proj4 command-line string in this class now, but could also come from a variety of other sources, including a WKT string, or parsed WKT objects, JSON, or from the ESPG numeric ID (which can be looked up online like this or like this, or even just an array or built up with [immutable] setters. How would that look? |
Well in my opinion we should move away from array notations. But if you want to reliable get your parameters from multiple source types than an interface is the way to go, but that interface should not have a |
Major axis, minor axis, flattening, reciprocal flattening, etc. The terms a, b, r, rf, f etc are well-known to GIS people, so if using the full names instead, then they do need to be absolutely the correct names. Proj4 parameters will be a, b, f etc. so there will be a mapping in there somewhere, perhaps in both directions if we wanted the Proj4 parameter string to go in both directions (for testing and documentation, if nothing else). Those are just the parameters for an ellipsoid. The others also have long names, but are also referred to by very common abbreviations - lat0, h, long0 etc. I think you are right that parameters and methods need a good, correct and logical name, but we also don't want to hit new users with a massive learning curve that is makes everything very different from what they are used to. It's why I have tried to use alias for may of the parameters - so you can use |
As long as the short names are clearly defined I don't mind Agree on your point, we can create mappings relatively easy; we could even do that via a different interface & trait. Then any implementor that implements the "basic" interface can implement the "extended" interface by adding it to the |
Even if we want 2 directions I'm not sure that the interface for configuration objects is the place. |
This object should be able to parse a valid Proj4 string and hold its settings.
Some of the valid arguments are listed here:
https://trac.osgeo.org/proj/wiki/GenParms
Values should be validated and transformed to their native types.
The text was updated successfully, but these errors were encountered: