[Mapserver-users] seg fault
Lowell Filak
lfilak at medinaco.org
Thu Sep 11 10:12:54 PDT 2003
Shapefile type of -1 is only for existing files.
To create a new shapefile MS_SHAPEFILE_POINT, MS_SHAPEFILE_ARC,
MS_SHAPEFILE_POLYGON, or MS_SHAPEFILE_MULTIPOINT needs to be used.
HTH
Lowell
The following message was sent by Nick Petersen-Bergeron
<bergeron at zedxinc.com> on Thu, 11 Sep 2003 10:01:26 -0400.
> Can anyone think of any good reason why I would get a seg fault from the
> following code:
>
> #!/usr/bin/perl
>
> use mapscript;
> use XBase;
>
> my $lefloreFile = "/home/httpd/cgi-bin/dm/shapes/leflore_ms";
>
> my $soilShapeFile = "/home/httpd/cgi-bin/dm/shapes/soiltype";
> my $soilShapeDBF = "/home/httpd/cgi-bin/dm/shapes/soiltype.dbf";
>
> my $soilShapeFileObj = new
shapefileObj($soilShapeFile,MS_SHAPEFILE_POLYGON);
>
> my $soilShape_xbase = XBase->create("name" =>
"$soilShapeDBF","field_names"
> => ["county_name","id"], "field_types" => ["C","N"], "field_lengths" =>
> [32,4],"field_decimals"=>[0,0]) or die print XBase->errstr;
>
> my $leforeShapeFile = new shapefileObj($lefloreFile,-1);
> print "$SFile\n";
> my $SFile = "/home/httpd/cgi-bin/dm/shapes/S941604";
> my $SShapeFile = new shapefileObj($SFile,-1);
>
> It seg faults on the last line.
>
> Nick Petersen-Bergeron
> System Administrator
>
> ZedX Inc.
> 369 Rolling Ridge Drive
> Bellefonte, PA. 16823
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list