Hi Frank..<br><br>My shapefile is in lat/lon unprojected...<br>I found the top left lat/lon and bottom right lat/lon ...<br>I know the image width and height <br><br>I use the pg_transform function of proj4&nbsp; ...<br>Using the World Mercator projection (epsg-54004)..definition
<br>&nbsp;<br>I convert all lat/lon ..to X,Y ..and the scale this X,Y to image size ... <br>I am getting about 2/3 pixel error in x and 30 pixels error in y ..<br><br>(I also used the OpenMap Java API to do the same thing but the result is the same).....
<br><br>Do u think this function will give me the pixel x,y accurately..<br><br>Thanks<br>Regards<br>Sandeep<br><br>On 10/18/06, Frank Warmerdam &lt;<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>&gt; wrote:<br>
&gt; Sandeep Kumar Jakkaraju wrote:<br>&gt; &gt; Hi Frank,<br>&gt; &gt;<br>&gt; &gt; Just to confirm ... I can use this method (if implemented) to get the<br>&gt; &gt; pixel x,y of the map image corressponding to some Lat Lon ... in the
<br>&gt; &gt; map.. right !!<br>&gt; <br>&gt; Sandeep,<br>&gt; <br>&gt; This would work assuming the map coordinate system is latlong.&nbsp;&nbsp;If the<br>&gt; map is projected, you would first need to reproject the latlong location
<br>&gt; to the map projection, and then run through msMapGeorefToPixel().&nbsp;&nbsp;The<br>&gt; functions are for transforming between map pixel/line and the maps<br>&gt; georeferenced coordinate system.<br>&gt; <br>&gt; Best regards,
<br>&gt; --<br>&gt; ---------------------------------------+--------------------------------------<br>&gt; I set the clouds in motion - turn up&nbsp;&nbsp; | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com
</a><br>&gt; light and sound - activate the windows | <a href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam</a><br>&gt; and watch the world go round - Rush&nbsp;&nbsp;&nbsp;&nbsp;| President OSGeo, <a href="http://osgeo.org">http://osgeo.org
</a><br>&gt; <br>&gt; <br><br><br>-- <br>Sandeep Kumar Jakkaraju <br>WeBlog:<br><a href="http://jakkarajus.blogspot.com">http://jakkarajus.blogspot.com</a><br>