[mapserver-users] shapefile, Perl/Mapscript issues on Windows
Ludovic Tenant
ludovic at siterra.com
Mon Jun 4 15:03:47 PDT 2001
Hi list,
Does anybody has been able to create a shapefile containing a line (2 or
more points) with Perl/Mapscript on a Windows environment ?
If so, I would welcome a script example doing that.
More generally, I would like to know if anyone has successfully installed
and tested the installation of Perl/Mapscript on Windows. I thought I
succeed in it, but I can't make this simple script working on Windows
whereas it seems to work on a Solaris box :
use mapscript;
use Getopt::Long;
$shapefile = new shapefileObj('myShape1', $mapscript::MS_SHP_ARC) or die
"Unable to open shapefile $file";
$point1 = new pointObj();
$point1->{x} = -122.0;
$point1->{y} = 34.0;
$point2 = new pointObj();
$point2->{x} = -116.0;
$point2->{y} = 40.0;
$line = new lineObj();
$line->add($point1);
#I have an error at the following line, looks like I can't add another
#point to the line
$line->add($point2);
$shape = new shapeObj($mapscript::MS_LINE);
$shape->add($line);
$shapefile->add($shape);
More information about the MapServer-users
mailing list