> ./genpics q 1 139.5143351 -34.7459112 139.5278707 -34.7207
Is there a parameter missing before "139.5143351"? minx is ARGV[3] in
your program.
Hope that helps
Manfred
Stephen Davies schrieb:
I am having my first attempt at using PERL/Mapscript to save map images
to files and am not getting too far.
I have a map file that works perfectly when used with:
http://server/cgi-bin/mapserv?map=/tmp/q.map&mapext=139.5143351+-34.7459112+139.5278707+-34.7207
I have the following PERL test bed:
#! /usr/bin/perl
#
# args are UID (for mapfile), pic sequence #, image type (extension),
map extent
#
use strict;
use mapscript;
my $uno = $ARGV[0];
my $seq = $ARGV[1];
my $ext = $ARGV[2];
my $minx = $ARGV[3];
my $miny = $ARGV[4];
my $maxx = $ARGV[5];
my $maxy = $ARGV[6];
#
my $mapfile = "/tmp/$uno.map";
my $map = mapscript::mapObj->new($mapfile);
$map->setExtent($minx,$miny,$maxx,$maxy);
#
my $img = $map->prepareImage();
$img = $map->draw();
my $fname = "/var/www/html/status_images/$uno_$seq.$ext";
print "$fname\n";
$img->save($fname);
Called as:
./genpics q 1 139.5143351 -34.7459112 139.5278707 -34.7207
This generates a blank jpeg file (of some 2800 bytes).
What am I missing?
Cheers and thanks,
Stephen Davies
MapServer version 4.8.0-rc2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE
SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER
SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILE