Skip to content
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

Better understand forward() and inverse() in projections #5

Open
judgej opened this issue Oct 22, 2015 · 1 comment
Open

Better understand forward() and inverse() in projections #5

judgej opened this issue Oct 22, 2015 · 1 comment

Comments

@judgej
Copy link
Owner

judgej commented Oct 22, 2015

There appear to be two forward() and inverse() methods in Proj.4. One is built into the projections, and appears to transform those projections from and to WGS84 Geodetic. These should probably be named fromWgs94() and toWgs84().

Then there is a forward and inverse at the proj4 command level. This takes any projection and turns it into another projection. forward() goes in one direction and inverse() goes in the other direction. it is not clear why there are these two directions, since the same thing can be achieved using a one-direction transform() and just swap the parameters over to go the other direction.

If only one projection is supplied, then the from projection is assumed to be WGS84 Latlong. I suspect the two methods are there so you know whether the single projection supplied is to be treated as the "from" or the "to". However, since we know what projection the point being converted is, that alone may give us that information.

@judgej
Copy link
Owner Author

judgej commented Oct 24, 2015

The "forward" and "inverse" names came from the original projection maths papers, so we'll keep those names for the projection classes at least. At the higher level, we'll find some better names, since there is no "forward" or "inverse" when mapping from one projection to another - they are simply two arbitrary projections you are mapping between.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant