Hello,
I am trying to display dinamic sectors in my screen, drawed as rectangles (for example), but i need: latitude min and max, longitude min and max for each sector, and i am having problems to transform screen coordinates to geographic coordinates. Let me explain better:
I can get the central point of the screen using:
double latitude = globeFragment.getWorldWindow().getNaviga tor().getLatitude();
double longitude = globeFragment.getWorldWindow().getNaviga tor().getLongitude();
double altitude = globeFragment.getWorldWindow().getNaviga tor().getAltitude();
Imagine that i want to draw 4 sectors and my device has the following dimensions: width: 2048px, height:1440 px. Therefore, my first sector will have these screen coordinates:
-----------------------------------------------------
(0,0) (0, WIDTH/2)
(HEIGHT/2, 0) (HEIGHT/2, WIDTH/2)
------------------------------------------------------
¿How can i obtain these geographic coordinates using those screen coordinates?. In the documentation i only have seen functions like: cartesianToGeographic, geographicToCartesian , etc but nothing like screenToCartesian(to unproject like in worlwind web). Thank you,
Mig
I am trying to display dinamic sectors in my screen, drawed as rectangles (for example), but i need: latitude min and max, longitude min and max for each sector, and i am having problems to transform screen coordinates to geographic coordinates. Let me explain better:
I can get the central point of the screen using:
double latitude = globeFragment.getWorldWindow().getNaviga tor().getLatitude();
double longitude = globeFragment.getWorldWindow().getNaviga tor().getLongitude();
double altitude = globeFragment.getWorldWindow().getNaviga tor().getAltitude();
Imagine that i want to draw 4 sectors and my device has the following dimensions: width: 2048px, height:1440 px. Therefore, my first sector will have these screen coordinates:
-----------------------------------------------------
(0,0) (0, WIDTH/2)
(HEIGHT/2, 0) (HEIGHT/2, WIDTH/2)
------------------------------------------------------
¿How can i obtain these geographic coordinates using those screen coordinates?. In the documentation i only have seen functions like: cartesianToGeographic, geographicToCartesian , etc but nothing like screenToCartesian(to unproject like in worlwind web). Thank you,
Mig
Comment