mixture of perl/mapscript and mapserver

Lowell Filak lfilak at MEDINACO.ORG
Thu Jan 6 16:53:44 EST 2005


> >As Ed explained, you can not incorporate an image in that manner.
> >The only ways I can think to do what you want are:
> >1) Setup your mapscript app to provide a WMS reply for supplying the
> >image to mapserv under a WMS layer deffinition.
> >2) Write a .wld file to go along with the image and include it in the
> >mapfile used by your mapserv instance as a raster layer.
> >
> >HTH
> >
> >Lowell
> >
> >The following message was sent by Joseph Norris <sirronj at PACBELL.NET> on
> >Fri, 17 Dec 2004 13:36:58 -0800.
> >
> >
> >
> >>Everyone,
> >>
> >>I have the following bit of code:
> >>
> >>$layerObj->draw($map, $img);
> >>$point_layer->draw($map, $img);
> >>
> >>
> >>my $new_map = "$png_location/" . sprintf("mx%0.10d",rand(1000000000)) .
> >>".map";
> >>
> >>$map->save($new_map);
> >>
> >>my $image_name = "$png_location/" .
> >>
> >>
> >sprintf("map%0.10d",rand(1000000000)) .
> >
> >
> >>".png";
> >>
> >>
> >>$img->save($image_name, $map);
> >>
> >>$img->free();
> >>
> >>
> >>my $url = qq!http://$domain/cgi-bin/mapserv!;
> >>   $url .= "?map_web_template=$template_path/map_template.html";
> >>   $url .= "&zoomsize=5";
> >>   $url .= "&zoomdir=1";
> >>   $url .= "&zoom=2";
> >>   $url .= "&map=$new_map";
> >>   $url .= "&map_web_imagepath=$png_location/";
> >>   $url .= "&map_web_imageurl=/$http_png_location/";
> >>   $url .= "&root=/maps/";
> >>   $url .= "&img=$image_name";
> >>   $url .= "&program=/cgi-bin/mapserv";
> >>   $url .= "&imgext=5890870.385 -192053.200 8943310.847 3226086.749";
> >>   $url .= "&mode=browse";
> >>
> >>
> >>I thought that upon the run of mapserver in my map_template_html I
> >>
> >>
> >would be
> >
> >
> >>able to load the [img] via the &img=$image_name.  However when it
> >>
> >>
> >loads I am
> >
> >
> >>getting a whole new image that contains nothing and is not at all
the same
> >>name that I have built.
> >>
> >>I am not sure how to mix these - I would like to start out building
my own
> >>layers  ( which I have been able to do - thanks to all of your help ),
> >>save these out in an image and the load this into mapserver so as to
have
> >>the browse capability.
> >>
> >>Have I made myself clear as mud?
> >>
> >>Thanks.
> >>
> >>
> >>#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print
> >>
> >>
> >@c=map chr
> >
> >
>
>$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,14,-
> >
> >
> >>68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);
> >>
> >>
> >
> >
> >
> >
> Ok I am finally back to examining this issue.  How do I set up a reply
> to mapserv to supply the image under WMS?
>
> Thanks.

Joseph,

I may be missing something on cpan but I don't readily see a module.
However there is a project called orthoserver at MIT written in perl
that appears to have WMS support added in April, 2003. You could use
parts of the orthoserver.cgi to teach your script how to speak WMS.?

Lowell

http://tull.mit.edu/orthoserver/



More information about the mapserver-users mailing list