-
Notifications
You must be signed in to change notification settings - Fork 797
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
Freeze hard-coded prime meridians and note they are no longer updated #4042
Conversation
@@ -580,8 +580,11 @@ int main(int argc, char **argv) { | |||
} | |||
proj_unit_list_destroy(units); | |||
} else if (arg[1] == 'm') { /* list prime meridians */ | |||
(void)fprintf(stderr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't emit a warning. If we want to emit one, then we should also do it for datum, ellipsoid, units, etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the second sentence "This list is no longer updated, and some values may conflict with other sources"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Listing datums was already removed (e9605e4).
Listing ellipsoids could potentially show a similar message.
Listing units uses proj_get_units_from_database
so is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to disregard my comments. I'm not that strong about them.
The only thing that is a bit weird is that internally PROJ still creates PROJ pipeline strings with those deprecated features, but one could argue that is an implementation detail. Well, actually not completely true, as we also export that to the sight of the advanced user...)
$ bin/projinfo -s "NTF (Paris)" -t "NTF" -o PROJ -q
+proj=pipeline
+step +proj=axisswap +order=2,1
+step +proj=unitconvert +xy_in=grad +xy_out=rad
+step +inv +proj=longlat +ellps=clrk80ign +pm=paris
+step +proj=unitconvert +xy_in=rad +xy_out=deg
+step +proj=axisswap +order=2,1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to have a short list of hard-coded of prime meridians (e.g. where paris
↔ 2.33722917) with the caveat that it doesn't change. It's a bit deprecated, but I wasn't planning to establish this as a deprecated feature. But yes, I can tone down the "legacy PROJ.4" wording throughout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above pipeline could also have +pm
expressed in decimal degrees, so the PROJ internals could be changed to do that in the future, should we decide to drop support for these hard-coded lists.
8092d6c
to
036f034
Compare
036f034
to
f69e987
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a few comments with suggestions but in general I am happy with this PR
@@ -580,8 +580,11 @@ int main(int argc, char **argv) { | |||
} | |||
proj_unit_list_destroy(units); | |||
} else if (arg[1] == 'm') { /* list prime meridians */ | |||
(void)fprintf(stderr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above pipeline could also have +pm
expressed in decimal degrees, so the PROJ internals could be changed to do that in the future, should we decide to drop support for these hard-coded lists.
Thanks for feedback @kbevers. I've taken the moment to further expand the docs on angular inputs too, which I wouldn't mind a bit of review on too. |
Looks great. Good job! |
This PR "freezes" hard-coded prime meridians that are listed in
src/datums.cpp
'sPJ_PRIME_MERIDIANS
struct. This has only had a few modifications since it was added 22 years ago (27c197f), but has some omissions (#4031) and some values conflict with other sources (#4029, #4030). Also, there are potentially many other prime meridians that users may want to choose from.This PR doesn't go as far as deprecating
cs2cs -lm
, actually it adds this missing doc item. However, a message is sent to stderr:Suggestions in rewording or changing tone are welcome.
This also updates docs/source/usage/projections.rst with a few corrections. The example is changed from
madrid
(which "has had various determinations", including 84b8264) tolisbon
which I assume has stayed put there for a while now.Closes #4031, #4029