<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Greetings,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>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?!  <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>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. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>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?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>ArtC<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Arthur Clifford<o:p></o:p></span></font></p>

</div>

</body>

</html>