Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Geo::Shapefile::Writer help

by tangent (Parson)
on Jan 28, 2016 at 16:14 UTC ( [id://1153890]=note: print w/replies, xml ) Need Help??


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, ...];

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1153890]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2024-04-18 16:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found