Osm2mp
Osm2mp.pl
Osm2mp.pl is a perl program by Liosha to convert from OSM format to polish format. It supports routing.
See the forum thread at http://forum.openstreetmap.org/viewtopic.php?id=1162 for more information and a download link. The source code: https://github.com/liosha/osm2mp .
svn co https://github.com/liosha/osm2mp osm2mp
Windows
There are exe-builds (created with PAR::Packer): osm2mp32.zip osm2mp64.zip (r777), getbound.zip mp-postprocess.zip
For perl distibutions with CPAN (like Strawberry perl) try this commands after installing:
cpan -T -i Config::Std cpan -i Template Text::Unidecode List::MoreUtils Encode::Locale Getopt::Long PerlIO::encoding cpan -i YAML Data::Dump Geo::Shapefile::Writer Geo::Openstreetmap::Parser Tree::R Math::Polygon cpan -i PerlIO::via::Unidecode PerlIO::via::PrepareCP1251 Inline::C Math::Polygon::Tree cpan -i Log::Any Log::Any::Adapter
For ActivePerl, only cpan -T -i Config::Std is needed, other packages can be found and installed faster via PPM (see the main menu).
Debian/Ubuntu
You will need the following dependencies:
sudo apt-get install libtemplate-perl libtext-unidecode-perl libyaml-perl
Ubuntu 12.04
Tested on osm2mp r634: https://code.google.com/p/osm2mp/source/browse/?r=634
# Ubuntu packages sudo apt-get install libconfig-std-perl libencode-locale-perl liblist-moreutils-perl libmath-polygon-perl libinline-perl libxml-parser-perl libtext-unidecode-perl libtemplate-perl libjson-perl # CPAN packages ## run cpan for auto-configuration (under normal user, no root here please) cpan ## restart shell to apply environment changes (close and open terminal again) ## install packages cpan Math::Geometry::Planar::GPC::Polygon Math::Polygon::Tree Tree::R Geo::Openstreetmap::Parser
Gentoo
emerge dev-perl/Inline dev-perl/Template-Toolkit dev-perl/Text-Unidecode app-portage/g-cpan
and
g-cpan -i Math::Geometry::Planar::GPC::Polygon Math::Polygon Math::Polygon::Tree
Fedora
yum install perl-Template-Toolkit
FreeBSD
make -C /usr/ports/converters/osm2mp install clean
or
portinstall osm2mp
ArchLinux
Install the following packages (from official repo or build from AUR):
perl-template-toolkit perl-text-unidecode perl-math-polygon perl-math-geometry-planar-gpc-polygon perl-math-polygon-tree perl-list-moreutils perl-data-dump
OpenSUSE
Open terminal app and enter following commands:
su zypper in perl-YAML perl -MCPAN -e "install List::MoreUtils" perl -MCPAN -e "install Text::Unidecode" perl -MCPAN -e "install Data::Dump" perl -MCPAN -e "install Math::Polygon" perl -MCPAN -e "install Inline::MakeMaker" perl -MCPAN -e "install Math::Geometry::Planar::GPC::Polygon" perl -MCPAN -e "install Math::Polygon::Tree" perl -MCPAN -e "install Tree::R"
Configuration
The file poly.cfg
contains default sets of RouteParams per highway type. See polish format for information on the RouteParams field.
Osminog
Osminog is an OSM to .MP (Polish format) converter by User:Asdert.