in reply to Re^3: Geo::Shapefile::Writer help
in thread Geo::Shapefile::Writer help

tangent, thank you, that makes perfect sense. I have tried the following code and am now getting an error regarding "Can't use string ("0") as an ARRAY ref while "strict refs" in use at <path to writer.pm> line 141". I have tried adding the use strict; and declaring $x/$y/$dummy, but did not help.
The following code is what I am using to try to get it to work:

use Geo::Shapefile::Writer; use List::Util qw(pairmap); $shape = Geo::Shapefile::Writer->new("Temp", 'POLYGON', [COL1 => 'C', +10],); my @coords = (0, 0, 0, 1, 1, 1, 1, 0, 0, 0); my @pairs = pairmap { [ $a, $b ] } @coords; # Checking to make sure pairs look correct foreach $dummy (@pairs) { ($x, $y) = @$dummy; print "$x, $y\n"; } $shape->add_shape(\@pairs, {Col1 => "Dumb1"}); $shape->finalize();

Replies are listed 'Best First'.
Re^5: Geo::Shapefile::Writer help
by poj (Abbot) on Jan 29, 2016 at 16:13 UTC