In direct graphics I could use the CONVERT_COORD function to return the lat/lon, in degrees, of a pixel after I had set a map projection in MAP_SET.
The new object-oriented MAP function shows provides a ConverCoord method but what it returns is a mystery. For example if I set a map with:
m = map('Mercator', limit=[59, -170, 74, -135], dimensions = [640, 640])
and then query the coordinates near the center I get
print, m.convertcoord(320,320,/device,/to_data)
-3812.2263 10309072. 9.2530546e-10
These look like perhaps distances in meters from a datum, but when I divide by an Earth radius and convert, I get a latitude of 92 degreees, which is problematic.
When I query what m is, I find it is defined as a MAPPROJECTION, but can find no documentation of what all the elements are.
Does anyone know how to get the lat/lon in radians or degrees from a specific pixel in a object oriented map projection?
|