The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Geo::MapInfo::MIF - Perl extension for handling MapInfo Interchange Format (MIF) files.

SYNOPSIS

  use Geo::MapInfo::MIF;
  
  my @file_contents = Geo::MapInfo::read_files($mif_file);
  
  my %regions = Geo::MapInfo::MIF::process_regions($column, $file_contents[0], $file_contents[1]);
  

ABSTRACT

The Geo::MapInfo::MIF module reads a MapInfo Interchange Format (MIF) file and the associated MID file. It uses the data found in this document http://www.directionsmag.com/mapinfo-l/mif/AppJ.pdf to parse the files.

DESCRIPTION

The Geo::MapInfo::MIF module reads a MapInfo Interchange Format (MIF) file and the associated MID file. It uses the data found in this document http://www.directionsmag.com/mapinfo-l/mif/AppJ.pdf to parse the files.

METHODS

read_files($filename)

If given a MIF file it looks for the associated MID file. If given a MID file it looks for the associated MIF file. This only looks in the same directory as the given file and assumes that both files have the same basename. Returns (\@mif_lines, \@mid_lines).

get_mif_info(@mif_lines)

This returns a hash containing the MIF file header.

process_regions($column, @mif_lines, @mid_lines)

Returns a hash of arrays of arrays in the following format:

%hash{region_name} = ([$long0, $lat0], [$long1, $lat1], [$long2, $lat2], ...)

$column is the index of the field of the column array returned by get_mif_info that contains the name of the region.

AUTHOR

Jeffery Candiloro <jeffery@cpan.org>

COPYRIGHT

Copyright 2009 Jeffery Candiloro.

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

The full text of the license can be found in the LICENSE file included with this module.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 164:

'=item' outside of any '=over'

Around line 180:

You forgot a '=back' before '=head1'