Converting point coordinates from one geo-referenced system to another.
Keep in mind that any Cartesian coordinate pair you select in a geo-referenced coordinate system corresponds to a point on the surface of the earth. This fact defines a relation between the coordinate pairs in one coordinate system and the coordinate pairs in any other, so long as the point in question actually exists in both systems. In other words, so long as the coordinate systems have a region of intersection, and the point in question is in it.
To convert the coordinates of a point from one geo-referenced coordinate system to another
- Define a "source" coordinate system with ade_projsetsrc.
- Define a "destination" coordinate system with ade_projsetdest.
- Pass a coordinate pair to ade_projptforward.
The function assumes that the coordinate pair you pass to it is a point in the source system, and it returns the corresponding coordinate pair in the destination system. If there is no corresponding coordinate pair, it returns nil.
To convert in the other direction, use ade_projptbackward.
You can specify coordinate triplets, but if you do, the Z value is ignored.