Skip to content

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

@judgej

Description

@judgej

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions