Take me over?
NAME
Geo::MapInfo::MIF::Writer::Region - Perl extension for writing MapInfo Interchange Format (MIF) Region files.
SYNOPSIS
use Geo::MapInfo::MIF::Writer::Region;
my $map=Geo::MapInfo::MIF::Writer::Region->new(basename=>$basename);
$map->addSimpleRegion(
data => {col1=>"val1", col2=>"val2"},
region => [[$lon1, $lat1], [$lon2, $lat2], [$lon3, $lat3], [$lon4, $lat4]],
);
$map->addMultipartRegion(
data => {col1=>"val1", col2=>"val2"},
regions => [ #note the "s" in regions
[[$lon1a, $lat1a], [$lon2a, $lat2a], [$lon3a, $lat3a], [$lon4a, $lat4a]],
[[$lon1b, $lat1b], [$lon2b, $lat2b], [$lon3b, $lat3b], [$lon4b, $lat4b]],
[[$lon1c, $lat1c], [$lon2c, $lat2c], [$lon3c, $lat3c], [$lon4c, $lat4c]],
],
);
$map->save;
DESCRIPTION
Perl extension for writing MapInfo Interchange Format (MIF) Region files.
Note: This package stores data in memory before writing so it may not be appropriate for every use.
USAGE
new
Creates a new object.
my $map=Geo::MapInfo::MIF::Writer::Region->new;
basename
Sets and returns the basename of the mid/mif files.
$map->basename("basename");
$map->basename("./path/basename");
$map->basename("/path/basename");
$map->basename(undef); #default is "mapinfo-yyyymmddhhmiss"
save
Writes mid and mif files to the name indicated by basename.
$map->save;
Note: This method overwrites files if they exist.
addSimpleRegion
Adds a new object to the in memory array.
$map->addSimpleRegion(
data => {id=>1, col2=>"Foo", col3=>"Bar"}, #default is id=>$index.
region => [[$x1,$y1], [$x2,$y2], [$x3,$y3]], #default is "none" which means no geocoded data
);
addMultipartRegion
Adds a new object to the in memory array.
$map->addMultipartRegion(
data => {id=>1, col2=>"Foo", col3=>"Bar"},
regions => [
[[$x1,$y1], [$x2,$y2], [$x3,$y3]],
\@r2, #can be island or lake but MapInfo figures that out for you.
\@r3,
],
);
LIMITATIONS
Currently this package only supports Regions since points and circles are trival to support in MapInfo.
Currently we only support string and integer types.
BUGS
Please log on RT and send an email to the author.
Patches accepted!
SUPPORT
DavisNetworks.com supports all Perl applications including this package.
AUTHOR
Michael R. Davis
CPAN ID: MRDVT
DavisNetworks.com
davis@davisnetworks.com
http://www.davisnetworks.com/
COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Geo::MapInfo::MIF - MapInfo Interchange Format (MIF) File Reader