[mapserver-users] getting extent and integration from amiya

Amiya Patra amiyapatra188 at gmail.com
Fri Dec 12 01:06:01 EST 2008


Hi
José María Michia I cant understand whats wrong with my msg....why u did nt
understand my query...Actually what I am trying to say that........I wrote
one jsp application.as well as mapserver application in which I used
phpmapscript..Both are different modules. Now I want to integrate both of
these. What I have done is that I created one link (with anchor tag) from
jsp page to mapserver page.( Both are using different port. )It works fine.
my question is that why it is running.. I thought that mapserver executable
file is CGI based ..and to do integration with tomcat CGI servlet must be
required. Actually whats happen is according to me , both are differnt
server...and when I run my jsp 1st server with a port is running and then
when I called mapserver from jsp it mean that I am saying tomcat to stop and
listen an another server with differnt port . its like one executable file
is called from one application.....and I am getting output.but someone told
me that it should not be run  because of cgi ..........I did not
get......that s why I am asking that please let me clear about
this..............


And regarding my 1st question u suggest one function............which I
already wrote in PHP.(given below)......but I think u did not get this
question also.....Actually I have several pictures(not raster data)  which I
taken from google snapshot......but their extent is
(0,0,456,567size=456X567)(0,0,567,657) like that......Look, all images have
minx and miny 0.....so how I will convert this one to lat long form....or
from where I will get lat long data.....I hope now u will get........and
reply me soon..........

Thanks...........
Amiya Patra




// Convert from image to map coordinates
         function img2map($width,$height,$point,$ext)
        {
             $minx = $ext->minx;
             $miny = $ext->miny;
             $maxx = $ext->maxx;
             $maxy = $ext->maxy;
             if ($point->x && $point->y)
            {
                $x = $point->x;
                 $y = $point->y;
                 $dpp_x = ($maxx-$minx)/$width;
                 $dpp_y = ($maxy-$miny)/$height;
                 $x = $minx + $dpp_x*$x;
                 $y = $maxy - $dpp_y*$y;
             }
             $pt[0] = $x;
             $pt[1] = $y;
             return $pt;
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081212/a5f7e0f0/attachment.html


More information about the mapserver-users mailing list