Libosmium  2.1.0
Fast and flexible C++ library for working with OpenStreetMap data
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Attributes | Private Member Functions | Friends | List of all members
osmium::Area Class Reference

#include <area.hpp>

Inheritance diagram for osmium::Area:
Inheritance graph
[legend]
Collaboration diagram for osmium::Area:
Collaboration graph
[legend]

Public Member Functions

bool from_way () const noexcept
 
osmium::object_id_type orig_id () const noexcept
 
std::pair< int, int > num_rings () const
 
bool is_multipolygon () const
 
osmium::memory::ItemIterator
< const osmium::InnerRing
inner_ring_cbegin (const osmium::memory::ItemIterator< const osmium::OuterRing > &it) const
 
osmium::memory::ItemIterator
< const osmium::InnerRing
inner_ring_cend (const osmium::memory::ItemIterator< const osmium::OuterRing > &it) const
 
- Public Member Functions inherited from osmium::OSMObject
object_id_type id () const noexcept
 Get ID of this object. More...
 
unsigned_object_id_type positive_id () const noexcept
 Get absolute value of the ID of this object. More...
 
OSMObjectset_id (object_id_type id) noexcept
 
OSMObjectset_id (const char *id)
 
bool deleted () const noexcept
 Is this object marked as deleted? More...
 
bool visible () const noexcept
 Is this object marked visible (ie not deleted)? More...
 
OSMObjectset_deleted (bool deleted) noexcept
 
OSMObjectset_visible (bool visible) noexcept
 
OSMObjectset_visible (const char *visible)
 
object_version_type version () const noexcept
 Get version of this object. More...
 
OSMObjectset_version (object_version_type version) noexcept
 
OSMObjectset_version (const char *version)
 
changeset_id_type changeset () const noexcept
 Get changeset id of this object. More...
 
OSMObjectset_changeset (changeset_id_type changeset) noexcept
 
OSMObjectset_changeset (const char *changeset)
 
user_id_type uid () const noexcept
 Get user id of this object. More...
 
OSMObjectset_uid (user_id_type uid) noexcept
 
OSMObjectset_uid_from_signed (signed_user_id_type uid) noexcept
 
OSMObjectset_uid (const char *uid)
 
bool user_is_anonymous () const noexcept
 Is this user anonymous? More...
 
osmium::Timestamp timestamp () const noexcept
 Get timestamp when this object last changed. More...
 
OSMObjectset_timestamp (const osmium::Timestamp timestamp) noexcept
 
const char * user () const noexcept
 Get user name for this object. More...
 
const TagListtags () const
 Get the list of tags for this object. More...
 
const char * get_value_by_key (const char *key, const char *default_value=nullptr) const noexcept
 
void set_attribute (const char *attr, const char *value)
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator begin () const
 
const_iterator end () const
 
template<class T >
t_iterator< T > begin ()
 
template<class T >
t_iterator< T > end ()
 
template<class T >
t_const_iterator< T > cbegin () const
 
template<class T >
t_const_iterator< T > cend () const
 
template<class T >
t_const_iterator< T > begin () const
 
template<class T >
t_const_iterator< T > end () const
 
- Public Member Functions inherited from osmium::OSMEntity
 OSMEntity (osmium::memory::item_size_type size, osmium::item_type type)
 
bool type_is_in (osmium::osm_entity_bits::type entity_bits) const
 
- Public Member Functions inherited from osmium::memory::Item
unsigned char * next () noexcept
 
const unsigned char * next () const noexcept
 
item_size_type byte_size () const noexcept
 
item_size_type padded_size () const
 
item_type type () const noexcept
 
bool removed () const noexcept
 
void set_removed (bool removed) noexcept
 

Static Public Attributes

static constexpr osmium::item_type itemtype = osmium::item_type::area
 

Private Member Functions

 Area ()
 

Friends

class osmium::builder::ObjectBuilder< osmium::Area >
 

Additional Inherited Members

- Public Types inherited from osmium::OSMObject
typedef
osmium::memory::CollectionIterator
< Item
iterator
 
typedef
osmium::memory::CollectionIterator
< const Item
const_iterator
 
template<class T >
using t_iterator = osmium::memory::ItemIterator< T >
 
template<class T >
using t_const_iterator = osmium::memory::ItemIterator< const T >
 
- Protected Member Functions inherited from osmium::OSMObject
 OSMObject (osmium::memory::item_size_type size, osmium::item_type type)
 
void set_user_size (string_size_type size)
 
- Protected Member Functions inherited from osmium::memory::Item
 Item (item_size_type size=0, item_type type=item_type()) noexcept
 
 Item (const Item &)=delete
 
 Item (Item &&)=delete
 
Itemoperator= (const Item &)=delete
 
Itemoperator= (Item &&)=delete
 
Itemset_type (const item_type item_type) noexcept
 

Detailed Description

An OSM area created out of a closed way or a multipolygon relation.

Constructor & Destructor Documentation

osmium::Area::Area ( )
inlineprivate

Member Function Documentation

bool osmium::Area::from_way ( ) const
inlinenoexcept

Was this area created from a way? (In contrast to areas created from a relation and their members.)

osmium::memory::ItemIterator<const osmium::InnerRing> osmium::Area::inner_ring_cbegin ( const osmium::memory::ItemIterator< const osmium::OuterRing > &  it) const
inline

Get iterator for iterating over all inner rings in a specified outer ring.

Parameters
itIterator specifying outer ring.
Returns
Iterator to first inner ring in specified outer ring.
osmium::memory::ItemIterator<const osmium::InnerRing> osmium::Area::inner_ring_cend ( const osmium::memory::ItemIterator< const osmium::OuterRing > &  it) const
inline

Get iterator for iterating over all inner rings in a specified outer ring.

Parameters
itIterator specifying outer ring.
Returns
Iterator one past last inner ring in specified outer ring.
bool osmium::Area::is_multipolygon ( ) const
inline

Check whether this area is a multipolygon, ie. whether it has more than one outer ring?

std::pair<int, int> osmium::Area::num_rings ( ) const
inline

Count the number of outer and inner rings of this area.

Returns
Pair (number outer rings, number inner rings)
osmium::object_id_type osmium::Area::orig_id ( ) const
inlinenoexcept

Return the Id of the way or relation this area was created from.

Friends And Related Function Documentation

Member Data Documentation

constexpr osmium::item_type osmium::Area::itemtype = osmium::item_type::area
static

The documentation for this class was generated from the following file: