Maps > Map Projections > Projecting Data: An Example > Calculating the Inverse Projection
 
Calculating the Inverse Projection
The inverse projection transforms projected data to longitude and latitude. This operation allows you, for example, to determine the geographical coordinates that a user designates with a mouse on a projected map.
In our example, we will perform the inverse projection on the coordinate that we have just calculated. (Of course, we expect to find the initial longitude and latitude).
To calculate the inverse projection, we call the inverse member function of the projection, having previously reset the coordinate ll to 0 to be sure of a correct calculation.
Reminder: The two characters (ll) are the letters (ll), not the numerals (11). This applies to the sections that follow as well.
ll.move(0., 0.);
status = projection.inverse(xy, ll);
if (status != IlvMaps::NoError())
IlvPrint("Projection exception for this data : %s",
IlvMaps::GetErrorMessageId(status));

Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.