OSM::Tree::Way -- OSM Way
the Way-Object derived from OSM::Tree::BASE
ToPeG
get the center of this way
returns a longitude,latitude pair
or undef,undef if the way has no Nodes
Example:
my ($lon,$lat)= $way->center();
get the lenth of this way
returns the length
Example:
my $length= $way->length();
get the Boundary box of this way
returns (lonmin,latmin,lonmax,latmax)
Example:
my ($lonin,$latmin)= $way->bbox();
get a node-object corresponding to the ID and this way
see OSM::Tree::Node for more
return a node-object or undef if the ID not exists in this way
add a node to the NodeList
see OSM::Tree::node_add() for more
return 1 on success
add a node to the NodeList
see OSM::Tree::node_add() for more
return 1 on success
add a node to the NodeList after the defined Node or NodeId
see OSM::Tree::node_add() for more
return 1 on success
add a node to the NodeList after the defined Node or NodeId
see OSM::Tree::node_add() for more
return 1 on success
delete a node from the NodeList return 1 on success
get a list of all node-objects corresponding to this way if an coderefence is given it will use as filter.
see OSM::Tree::Node for more
returns a list of node-objects or an empty list if there are no nodes
get a list of all node-IDs corresponding to this way
returns a list of node-IDs or an empty list if there are no node-IDs
delete a node ID from the Node_list
return 1 on succcess
delete node by id
return 1 on succcess
get the length the list of all nodes
returns the length of the node-list
get the length the list of all nodes
returns the length of the node-list
make OSM::Tree::Polygon Object from this way
returns undef or an OSM::Tree::Polygon Object
if OSM::Tree::Polygon is not loadable (As example Math::Polygon is not einstalled ) this Method returns undef.
see: OSM::Tree::Polygon