OGC / MapScript questions
Stephen Lime
steve.lime at dnr.state.mn.us
Fri Feb 16 09:06:25 PST 2001
OGC compliance is coming, but first it will exist on the server level and then
perhaps at the client level. That is, initially MapServer will be able to act as
a compliant WMT server and will not be a WMT client.
That said you should be able to integrate other WMT server output into your
maps using MapScript. The basic algorithm would be:
1) open map, set extents etc.
2) step through layers, rendering each in turn, if the layer is to be retrieved
elsewhere then nab the image, save it and alter the layer definition to use
it. remember you can use gif/png in images without world files (TRANSFORM
FALSE).
3) write output image/page
4) cleanup
MapScript is intended as a way to replace the MapServer CGI. It's possible to
rewrite the CGI version in perl or whatever. By the same token you can write
very custom applications that do things the generic CGI C implementation can't
do. You could also use the C library, but scripting seems to appeal to a larger
audience. There are ways to integrate MapScript apps with the CGI version
such as writing custom mapfiles or retrieving/creating custom data before
passing a request to the CGI piece. That would save re-writing template
processing functionality.
I've not seen the error you mention before. Try searching perl.com...
Steve
Stephen Lime
Internet Applications Analyst
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> "Tom Kralidis" <tomkralidis at hotmail.com> 02/14/01 01:47PM >>>
Hi,
I'v been working w/ MapServer to build a basic application. Until now, I
have not used any MapScript.
I would like to integrate layers called from OGC-type servers (eg.
clearinghouse dcw data), to overlay onto my datasets. I have a script to
return an OGC-style response of data BBOX, and would like to glue this into
mapserver.
I understand OGC compliance is forthcoming, but is this possible in
MapScript in the interim? Does anyone have any examples of this working?
I tried running the site example for MapScript on my web server:
#!/usr/bin/perl -w
use mapscript;
my $map = new mapObj('/www/htdocs/gis/mapserv/wmp/wmp-dev.map') or die
"Unable to open mapfile: $!\n";
my $img = $map->draw() or die('Unable to draw map');
mapscript::msSaveImage($img, '/tmp/imgfile', $map->{interlace},
$map->{transparent});
and get the following error in my error_log:
Unable to open mapfile: Inappropriate ioctl for device
I'm running mapserver on a RedHat6.2 with Apache-1.3.14
Anyone had this type of issue?
How does one deal w/ MapScript? Does it replace the mapserv binary as the
driving application, calling everthing through there?
Any advice would be appreciated.
Thanks
..Tom
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
More information about the MapServer-users
mailing list