Geo::Parse::PolishFormat - Perl extension for parsing maps in polish text format (*.mp).
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}], },
}
http://www.cgpsmapper.com/.
Dmitry Ovsyanko
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.
To install Geo::Parse::PolishFormat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Parse::PolishFormat
CPAN shell
perl -MCPAN -e shell install Geo::Parse::PolishFormat
For more information on module installation, please visit the detailed CPAN module installation guide.