Memphis - Cairo based OSM renderer, it draws OpenStreet Maps
use Memphis; my $renderer = Memphis::Renderer->new(); # Load the OSM map my $map = Memphis::Map->new(); $map->load_from_file("map.osm.); $renderer->set_map($map); # Load the OSM rules my $rule_set = Memphis::RuleSet->new(); $rule_set->load_from_file("rules.xml"); $renderer->set_rule_set($rule_set); # Render the OSM map as a png file at zoom level 1 $renderer->draw_png("osm.png", 1);
Memphis provides the Perl bindings for the C library libmemphis which is a generic glib/cairo based OSM renderer library. Basically it draws maps on arbitrary cairo surfaces.
For more information about libmemphis see: https://trac.openstreetmap.ch/trac/memphis/wiki/LibMemphis.
Emmanuel Rodriguez <potyl@cpan.org>.
Copyright (C) 2010 by Emmanuel Rodriguez.
This library is free software; you can redistribute it and/or modify it under the same terms of:
This module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You should have received a copy of the GNU Library General Public License along with this module; if not, see http://www.gnu.org/licenses/.
For the terms of The Artistic License, see perlartistic.
To install Memphis, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Memphis
CPAN shell
perl -MCPAN -e shell install Memphis
For more information on module installation, please visit the detailed CPAN module installation guide.