Geo::Openstreetmap::Parser - Openstreetmap XML dump parser
version 0.02
Creates a parser object
my $parser = Geo::Openstreetmap::Parser->new( node => \&process_node, ... ); sub process_node { my ($obj) = @_; ... }
Callbacks are possible for any tag, but useful for osm primitives: node way relation
Callback function receives hash with params: attr - hash with xml attributes tag - hash with osm tags nd - array of node_ids (for ways) member - array of hashes like { type => 'way', role => 'from', ref => '-1' } (for relations)
Parses XML input, executing defined callback functions for OSM objects
$parser->parse( *STDIN );
liosha <liosha@cpan.org>
This software is copyright (c) 2012 by liosha.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Geo::Openstreetmap::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Openstreetmap::Parser
CPAN shell
perl -MCPAN -e shell install Geo::Openstreetmap::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.