in reply to Geo::Shapefile::Writer help

Not sure where you are having a problem - if you can create a simple polygon with a few vertices it is easy to add as many vertices as you like:
my $shp_writer = Geo::Shapefile::Writer->new( $name, 'POLYGON', @attr_ +descriptions ); my $shape = [ [86.925, 27.988], [86.5278, 27.744], [86.43, 27.365], # ...many more vertices ]; $shp_writer->add_shape( $shape, @attributes );

Replies are listed 'Best First'.
Re^2: Geo::Shapefile::Writer help
by Anonymous Monk on Apr 05, 2016 at 19:11 UTC

    Because POLYGON supports multi-part polygons you have to put each part in an array reference too.

    my $pt1 = [ $x, $y ]; my $part1 = [ $pt1, $pt2, ...]; my $polygon = [ $part1, $part2, ...];