Ocean
Loading...
Searching...
No Matches
Ocean::IO::Maps::Basemap::Object Class Reference

This class is the base class for all map objects. More...

#include <Basemap.h>

Inheritance diagram for Ocean::IO::Maps::Basemap::Object:

Public Types

enum  ObjectType : uint32_t {
  OT_UNKNOWN = 0u , OT_BUILDING , OT_LAND_COVER , OT_LAND_USE ,
  OT_ROAD , OT_TRANSIT , OT_WATER
}
 Definition of individual object types. More...
 

Public Member Functions

ObjectType objectType () const
 Returns the type of this object.
 
unsigned int layerExtent () const
 Returns the extent of the layer in which this object is defined.
 
Vector2 vectorFromCoordinate (const PixelPositionI &coordinate, const Scalar targetExtent) const
 Converts the coordinate defined in the owning layer of this object to a target domain with individual extent.
 

Protected Member Functions

 Object (const ObjectType objectType, const unsigned int layerExtent)
 Creates a new object.
 

Protected Attributes

ObjectType objectType_ = OT_UNKNOWN
 The object's type.
 
unsigned int layerExtent_ = 0u
 The extent of the layer to which this object belongs, in pixel, with range [1, infinity), 0 if invalid.
 

Detailed Description

This class is the base class for all map objects.

Objects are extracted from layers, layer coordinates are given with pixel precision.

Member Enumeration Documentation

◆ ObjectType

Definition of individual object types.

Enumerator
OT_UNKNOWN 

The object type is unknown.

OT_BUILDING 

The object is a building.

OT_LAND_COVER 

The object is a land cover.

OT_LAND_USE 

The object is a land use.

OT_ROAD 

The object is a road.

OT_TRANSIT 

The object is a transit.

OT_WATER 

The object is a water.

Constructor & Destructor Documentation

◆ Object()

Ocean::IO::Maps::Basemap::Object::Object ( const ObjectType  objectType,
const unsigned int  layerExtent 
)
inlineprotected

Creates a new object.

Parameters
objectTypeThe type of the new object, must be valid
layerExtentThe extent of the layer to which this object belongs, in pixel, with range [1, infinity)

Member Function Documentation

◆ layerExtent()

unsigned int Ocean::IO::Maps::Basemap::Object::layerExtent ( ) const
inline

Returns the extent of the layer in which this object is defined.

Returns
The layer's extent, in pixels, with range [1, infinity), 0 if invalid

◆ objectType()

Basemap::Object::ObjectType Ocean::IO::Maps::Basemap::Object::objectType ( ) const
inline

Returns the type of this object.

Returns
The object's type

◆ vectorFromCoordinate()

Vector2 Ocean::IO::Maps::Basemap::Object::vectorFromCoordinate ( const PixelPositionI coordinate,
const Scalar  targetExtent 
) const
inline

Converts the coordinate defined in the owning layer of this object to a target domain with individual extent.

Parameters
coordinateThe coordinate located in the layer to which this object belongs, with range (-infinity, infinity)x(-infinity, infinity)
targetExtentThe extent of the target domain, with sub-pixel precision, with range [1, infinity)
Returns
The resulting converted coordinate

Field Documentation

◆ layerExtent_

unsigned int Ocean::IO::Maps::Basemap::Object::layerExtent_ = 0u
protected

The extent of the layer to which this object belongs, in pixel, with range [1, infinity), 0 if invalid.

◆ objectType_

ObjectType Ocean::IO::Maps::Basemap::Object::objectType_ = OT_UNKNOWN
protected

The object's type.


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