msMapGeorefToPixel() - mapobj.c
Sandeep Kumar Jakkaraju
sandeepkumar.jakkaraju at GMAIL.COM
Wed Oct 18 10:39:59 PDT 2006
Hi Frank..
My shapefile is in lat/lon unprojected...
I found the top left lat/lon and bottom right lat/lon ...
I know the image width and height
I use the pg_transform function of proj4 ...
Using the World Mercator projection (epsg-54004)..definition
I convert all lat/lon ..to X,Y ..and the scale this X,Y to image size ...
I am getting about 2/3 pixel error in x and 30 pixels error in y ..
(I also used the OpenMap Java API to do the same thing but the result is the
same).....
Do u think this function will give me the pixel x,y accurately..
Thanks
Regards
Sandeep
On 10/18/06, Frank Warmerdam <warmerdam at pobox.com> wrote:
> Sandeep Kumar Jakkaraju wrote:
> > Hi Frank,
> >
> > Just to confirm ... I can use this method (if implemented) to get the
> > pixel x,y of the map image corressponding to some Lat Lon ... in the
> > map.. right !!
>
> Sandeep,
>
> This would work assuming the map coordinate system is latlong. If the
> map is projected, you would first need to reproject the latlong location
> to the map projection, and then run through msMapGeorefToPixel(). The
> functions are for transforming between map pixel/line and the maps
> georeferenced coordinate system.
>
> Best regards,
> --
>
---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | President OSGeo, http://osgeo.org
>
>
--
Sandeep Kumar Jakkaraju
WeBlog:
http://jakkarajus.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20061018/2aa31496/attachment.htm>
More information about the MapServer-users
mailing list