NAME

OSM::Tree::Relation -- OSM Relation

SYNOPSIS

DESCRIPTION

the Relation-Object derived from OSM::Tree::BASE

AUTHOR

ToPeG

OSM::Tree::Relation

the relation-object

member(ID)

get an member of this relation

returns an member-object or undef if there is no member with this id

member_add(<HASH>)

add member

keys are:

- ref = ID of the Way/Node/Relation - type = type of the member (way/node/relation) - role = The Role

see OSM::Tree::Member and OSM-XML spec for more

returns the an member-object if the ref points to an Object in the OSM::Tree or 1 if not or return undef if it fails;

member_del(MEMBER)

remove a member returns 1 on success;

member_id_del(ID)

remove a member returns 1 on success;

member_list(<CODE>)

get an member-object-list if this relation if an coderefence is given it will use as filter.

returns an member-object-list or an empty list if there are no members

member_id_list()

get an member-id-list if this relation

returns an member-id-list or an empty list if there are no members

member_list_length()

get the length the list of all members

returns the length of the member-list

member_exists(ID)

returns true if the member-id exists

kind()

returns $self->tag('type') but is faster.

OSM::Tree::Member

the member-object

type()

get the type of the child of this member

returns an String of the type ("way","node","relation")

child()

get the child of this member

returns an Object

role()

returns a String or undef if the XML-tag ist not set

See also

OSM::Tree::BASE

OSM::Tree::Node

OSM::Tree::Way

OSM::Tree::Relation

OSM::Tree::TagList

OSM::Tree::Polygon

OSM::Tree