[mapserver-users] RE: is there such a thing as a pixel/screen projection?

Arthur Clifford art at artspad.net
Fri Jan 23 07:36:33 EST 2009


Greetings,

 

I was wondering whether there is a way to provide a proj4 string or other
method for specifying a projection where the units are in pixels and screen
width and height are provided? My desire is to use the PointObj's project
function for forward and reverse projecting an x,y screen coordinate. I find
it odd that MapScript has great functions for zooming and panning based on
pixel values and the whole shpxy functionality in the templating engine but
lacks a way to convert a pixel to lat/lon or other projection values. It
would be one thing if nothing in MapScript worked that way, but clearly
something in the code-base knows how to do the conversion. I find this
especially odd when the queryByPoint function requires a point object that
explicitly states it should be in projected not screen values. My google
searches thus far have pointed to useful formulae for doing the trick, but
what's up with that?!  

 

I feel like I'm missing a less-than-obvious logic-leap that one is supposed
to just know to make by understanding the object model. I have RTFM and I
nothing I see suggests it is possible through php mapscript objects to
convert screen units to a target projection. If there are tutorials or
examples of how to do this I haven't yet discovered any. 

 

So, how does one, through php MapScript, get a lat/lon value for projecting
into projection values if a PointObj cannot be defined with pixel values and
the project functions take PointObj? Also, how would one go about requesting
a special screen-projection as a projection to specify if something like
that does not exist?

 

ArtC

Arthur Clifford

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090123/c93ce968/attachment.html


More information about the mapserver-users mailing list