Geo::OSM::Primitive::Way - Abstract base class for the Open Street Map data primitive way.
…
The idea is to encapsulte methods that use OpenStreetMap data (that is possibly stored in Geo::OSM::DBI.
my $way = Geo::OSM::Primitive::Way->new($osm_way_id);
my @nodes = $way -> nodes();
Returns the nodes, stored in the cache via "_set_cache_nodes", that the way conisist of.
my ($lat_start, $lon_start, $lat_end, $lon_end) = $way -> start_end_coordinates();
Returns the way's start and end coordinates.
$way->_set_cache_nodes($node_1, $node_2, $node_3, … $node_n);
The source code is on github. Meaningful pull requests are welcome.
To install Geo::OSM::Primitive, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::OSM::Primitive
CPAN shell
perl -MCPAN -e shell install Geo::OSM::Primitive
For more information on module installation, please visit the detailed CPAN module installation guide.