Geo::OSM::MapFeatures - Parses and represents OpenStreetMap Map Features
Version 0.01
use Geo::OSM::MapFeatures;
my $mf = new Geo::OSM::MapFeatures; $mf->download(); $mf->parse();
# To print a simple ascii representation: foreach my $category ( $mf->categories() ){ print "\n\n===== $category =====\n"; foreach my $feature ( $mf->features($category) ){ print "$feature\n"; } }
# Or you can choose not to use the string overloading and get the # individual elements yourself: foreach my $category ( $mf->categories() ){ print "\n\n===== $category =====\n"; foreach my $feature ( $mf->features($category) ){ print "Key: ".$feature->key()."\n"; print "Value(s): ". join("\n ", @{$feature->values()})."\n"; print "Description: ".$feature->description()."\n\n"; } }
Create a new instance of this class.
Returns: new instance of this class.
Downloads Map Features from wiki.openstreetmap.org.
Throws exceptions if something goes wrong.
There is also a debug_download function that runs download then freezes the content into "mapfeatures.debug" in the current directory, so you don't have to wait so much for the wiki while developing.
Returns: undef
Parses map features.
Returns a list of feature categories.
Returns a list of features.
If given an argument it as taken as a category, and only features in that category will be returned.
Base exception class for errors thrown by this module
Network error
Go find out who broke map feature this time...
Knut Arne Bjørndal, <bob at cakebox.net>
<bob at cakebox.net>
Please report any bugs or feature requests to bug-geo-osm-mapfeatures at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Geo-OSM-MapFeatures. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-geo-osm-mapfeatures at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Geo::OSM::MapFeatures
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Geo-OSM-MapFeatures
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Geo-OSM-MapFeatures
CPAN Ratings
http://cpanratings.perl.org/d/Geo-OSM-MapFeatures
Search CPAN
http://search.cpan.org/dist/Geo-OSM-MapFeatures
Copyright 2008 Knut Arne Bjørndal, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Bjørndal,'. Assuming UTF-8
To install Geo::OSM::MapFeatures, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::OSM::MapFeatures
CPAN shell
perl -MCPAN -e shell install Geo::OSM::MapFeatures
For more information on module installation, please visit the detailed CPAN module installation guide.