[PROJ] Requesting help with displaying projection

Daniel Suson djsuson at gmail.com
Mon Jul 13 12:01:02 PDT 2020


     I am implementing a program that as part of its functionality takes 
a sky map stored in memory as a two dimensional array and displays it in 
various map projections on to the screen. It currently implements a 
Mollweide projection via a hard coded routine. I would like to replace 
this with calls to proj. The logical path would be

     (i,j) --> (latitude, longitude) --> (u,v) --> (x,y)

where (i,j) are the coordinates of the entry in the two dimensional 
array, (latitude, longitude) are the latitude/longitude values 
associated with the array coordinates, (u,v) are the position values in 
the projection coordinate system, and (x,y) is the equivalent pixel 
location on the display array.

     I have all of the steps up to the (u,v) --> (x,y) conversion. 
Complicating this problem is that programming-wise it is easier to start 
with a pixel location and go backwards. This will require first checking 
to see if (x,y) is even a valid location for the associated projection's 
(u,v) position. After than it should be a simple matter of doing a 
inverse transformation to find the value in the (i,j) array element.

     While I'm continuing to try and solve this myself, I'm hoping that 
someone in the community may already know how to do this in order to 
reduce the time spent on this step. Any help would be greatly appreciated!

Sincerely,

Dan



More information about the PROJ mailing list