The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Geo::Shapefile::Writer - simple pureperl shapefile writer

VERSION

version 0.002

DESCRIPTION

Geo::Shapelib is cool, but not portable. So here is alternative, if you need just simple shp export.

METHODS

new

    my $shp_writer = Geo::Shapefile::Writer->new( $name, $type, @attr_descriptions );

Create object and 3 associated files. Possible attribute description formats: * scalar - just field name * arrayref [ $name, $type, $length, $decimals ] * hashref { name => $name, type => 'N', length => 8, decimals => 0 } - CAM::DBF-compatible

Defaults will be used if field is not completely described

add_shape

    $shp_writer->add_shape( $object, @attributes );

Attributes are array or arrayref or hashref

finalize

    $shp_writer->finalize();

Update global fields, close files

AUTHOR

liosha <liosha@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by liosha.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.