NAME
Geo::Parse::PolishFormat - Perl extension for parsing maps in polish text format (*.mp).
SYNOPSIS
use Geo::Parse::PolishFormat;
use Data::Dumper; # not required, just for demo
my $p = Geo::Parse::PolishFormat -> new ();
$p -> parse ('my_map.mp', sub {warn Dumper ($_[0])});
### Source file (my_map.mp):
[POLYLINE]
Type=0x6
Label=Some Street
CityIdx=1
RoadID=11111
RouteParam=3,0,0,0,0,0,0,0,0,0,0,0
Data0=(33.89400,33.40310),(33.89455,33.41477),(33.89458,33.41576)
Nod1=0,1604,0
Nod2=2,1673,0
[END]
### Result:
$VAR1 = {
name => 'POLYLINE',
lines => [
'Type=0x6',
'Label=Some Street',
'CityIdx=1',
'RoadID=118291',
'RouteParam=3,0,0,0,0,0,0,0,0,0,0,0',
'Data0=(33.89400,33.40310),(33.89455,33.41477),(33.89458,33.41576)',
'Nod1=0,1604,0',
'Nod2=2,1673,0',
],
attributes => {
Type => '0x6',
Label => 'Some Street',
CityIdx => '1',
RoadID => '118291',
RouteParam => [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
Data0 => [[33.89400, 33.40310], [33.89455, 33.41477], [33.89458,33.41576]]',
Nod1 => [0, 1604, 0],
Nod2 => [2, 1673, 0],
},
collections => {
Data => [$VAR1 -> {Data0}],
Nod => [$VAR1 -> {Nod1}, $VAR1 -> {Nod2}],
},
}
SEE ALSO
AUTHOR
Dmitry Ovsyanko
COPYRIGHT AND LICENSE
Copyright (C) 2007 by Dmitry Ovsyanko
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.