penny has asked for the wisdom of the Perl Monks concerning the following question:
use Geo::ShapeFile::Point comp_includes_z=>0; use Geo::ShapeFile; #reads the "test3D" shapefile layer. $shapefile = new Geo::ShapeFile("test3D"); #loops throught each shapefile and gets the shape #for each record for (1 ..$shapefile->shapes){ $shape = $shapefile->get_shp_record($_); #puts the points into an array of hashes @point = $shape->points; #for each point get the x,y co-ords and the #(hieght) values and print foreach $p (@point){ $x=$p->X; $y=$p->Y; $z=$p->Z; print "$x, $y, $z \n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Geo::ShapeFile
by jasonk (Parson) on May 13, 2005 at 18:10 UTC | |
|
Re: Geo::ShapeFile
by kvale (Monsignor) on May 11, 2005 at 03:47 UTC | |
by penny (Novice) on May 11, 2005 at 04:52 UTC | |
by jasonk (Parson) on May 11, 2005 at 13:29 UTC | |
|
Re: Geo::ShapeFile
by jasonk (Parson) on May 11, 2005 at 13:43 UTC | |
by penny (Novice) on May 12, 2005 at 03:11 UTC | |
|
Re: Geo::ShapeFile
by rupesh (Hermit) on May 11, 2005 at 06:56 UTC |