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 ...<br>Using the World Mercator projection (epsg-54004)..definition
<br> <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 <<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>> wrote:<br>
> Sandeep Kumar Jakkaraju wrote:<br>> > Hi Frank,<br>> ><br>> > Just to confirm ... I can use this method (if implemented) to get the<br>> > pixel x,y of the map image corressponding to some Lat Lon ... in the
<br>> > map.. right !!<br>> <br>> Sandeep,<br>> <br>> This would work assuming the map coordinate system is latlong. If the<br>> map is projected, you would first need to reproject the latlong location
<br>> to the map projection, and then run through msMapGeorefToPixel(). The<br>> functions are for transforming between map pixel/line and the maps<br>> georeferenced coordinate system.<br>> <br>> Best regards,
<br>> --<br>> ---------------------------------------+--------------------------------------<br>> I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com
</a><br>> light and sound - activate the windows | <a href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam</a><br>> and watch the world go round - Rush | President OSGeo, <a href="http://osgeo.org">http://osgeo.org
</a><br>> <br>> <br><br><br>-- <br>Sandeep Kumar Jakkaraju <br>WeBlog:<br><a href="http://jakkarajus.blogspot.com">http://jakkarajus.blogspot.com</a><br>