8 #ifndef META_OCEAN_IO_MAPS_BASEMAP_H
9 #define META_OCEAN_IO_MAPS_BASEMAP_H
16 #include <vtzero/feature.hpp>
17 #include <vtzero/geometry.hpp>
86 inline ObjectType objectType()
const;
92 inline unsigned int layerExtent()
const;
109 inline Object(
const ObjectType objectType,
const unsigned int layerExtent);
117 unsigned int layerExtent_ = 0u;
296 inline Transit(
const TransitType transitType, std::string&& name,
PixelPositionGroupsI&& lineStrings,
const unsigned int layerExtent);
302 inline TransitType transitType()
const;
382 inline Scalar height()
const;
530 inline LandUseType landUseType()
const;
585 inline LandCoverType landCoverType()
const;
637 inline TileIndexPair(
const unsigned int latitudeIndex,
const unsigned int longitudeIndex);
643 inline unsigned int latitudeIndex()
const;
649 inline unsigned int longitudeIndex()
const;
656 inline bool isInside(
const unsigned int numberTiles)
const;
667 bool isLocationClose(
const TileIndexPair& tileIndexPair,
const double latitudeFraction,
const double longitudeFraction,
const double maxFraction = 0.2)
const;
673 inline bool isValid()
const;
694 inline size_t operator()(
const TileIndexPair& tileIndexPair)
const;
708 unsigned int latitudeIndex_ = (
unsigned int)(-1);
711 unsigned int longitudeIndex_ = (
unsigned int)(-1);
722 class OCEAN_IO_MAPS_EXPORT
Tile
748 inline unsigned int level()
const;
796 inline bool isValid()
const;
811 static constexpr
inline unsigned int numberTiles(
const unsigned int level);
822 static TileIndexPair calculateTile(
const unsigned int level,
const double latitude,
const double longitude,
double* latitudeTileFraction =
nullptr,
double* longitudeTileFraction =
nullptr);
833 static void calculateTileFractions(
const unsigned int level,
const double latitude,
const double longitude,
const TileIndexPair& tileIndexPair,
double& latitudeTileFraction,
double& longitudeTileFraction);
873 unsigned int level_ = 0u;
1077 static constexpr
double minLatitude = -85.05112878;
1080 static constexpr
double maxLatitude = 85.05112878;
1199 objectType_(objectType),
1200 layerExtent_(layerExtent)
1207 return layerExtent_;
1212 ocean_assert(layerExtent_ >= 1u);
1224 Object(OT_ROAD, layerExtent),
1225 roadType_(roadType),
1226 name_(std::move(name)),
1227 lineStrings_(std::move(lineStrings))
1239 return lineStrings_;
1243 Object(OT_TRANSIT, layerExtent),
1244 transitType_(transitType),
1245 name_(std::move(name)),
1246 lineStrings_(std::move(lineStrings))
1253 return transitType_;
1258 return lineStrings_;
1262 Object(objectType, layerExtent),
1263 outerPolygons_(std::move(outerPolygons)),
1264 innerPolygons_(std::move(innerPolygons))
1271 return outerPolygons_;
1276 return innerPolygons_;
1282 lineStrings_(std::move(lineStrings))
1294 return lineStrings_;
1299 waterType_(waterType)
1311 landUseType_(landUseType),
1312 lineStrings_(std::move(lineStrings))
1319 return landUseType_;
1324 return lineStrings_;
1329 landCoverType_(landCoverType),
1330 lineStrings_(std::move(lineStrings))
1337 return landCoverType_;
1342 return lineStrings_;
1346 latitudeIndex_(latitudeIndex),
1347 longitudeIndex_(longitudeIndex)
1354 return latitudeIndex_;
1359 return longitudeIndex_;
1364 return latitudeIndex_ < numberTiles && longitudeIndex_ < numberTiles;
1369 return latitudeIndex_ != (
unsigned int)(-1) && longitudeIndex_ != (
unsigned int)(-1);
1379 return !(*
this == other);
1389 tileIndexPair_(tileIndexPair)
1401 return tileIndexPair_;
1411 return level_ >= 1u && level_ <= 22u && tileIndexPair_.isValid() && tileIndexPair_.latitudeIndex() < numberTiles(level_) && tileIndexPair_.longitudeIndex() < numberTiles(level_);
1416 ocean_assert(level >= 1u && level < 22u);
This class implements a 2D bounding box with pixel precision.
Definition: PixelBoundingBox.h:57
This class implements a 2D pixel position with pixel precision.
Definition: PixelPosition.h:65
bool isValid() const
Returns whether this pixel position object holds two valid parameters.
T y() const
Returns the vertical coordinate position of this object.
Definition: PixelPosition.h:470
T x() const
Returns the horizontal coordinate position of this object.
Definition: PixelPosition.h:458
This class implements a building object.
Definition: Basemap.h:365
Building(PixelPositionGroupsI &&outerPolygons, PixelPositionGroupsI &&innerPolygons, PixelPositionGroupsI &&lineStrings, const Scalar height, const unsigned int layerExtent)
Creates a new building.
Definition: Basemap.h:1279
Scalar height() const
Returns the height of the building.
Definition: Basemap.h:1287
CV::PixelBoundingBoxI boundingBox() const
Returns the pixel bounding box entirely enclosing this building.
Scalar height_
The height of the bulding in meter, with range [0, infinity), -1 if unknown.
Definition: Basemap.h:399
PixelPositionGroupsI lineStrings_
The individual line strings of this building.
Definition: Basemap.h:402
const PixelPositionGroupsI & lineStrings() const
The individual line strings of this building.
Definition: Basemap.h:1292
Geometry handler for polygons.
Definition: Basemap.h:929
PixelPositionsI intermediatePolygons_
The points of the current active polygon.
Definition: Basemap.h:959
PixelPositionGroupsI outerPolygons_
The individual outer polygons.
Definition: Basemap.h:962
void ring_begin(uint32_t count)
This is called at the beginning of each ring with the number of points in this ring.
void reset()
Resets the handler so that it can be reused.
void ring_end(vtzero::ring_type ringType)
This is called at the end of each ring.
void ring_point(vtzero::point point)
This is called once for each point.
PixelPositionGroupsI innerPolygons_
the indvidual inner polygons.
Definition: Basemap.h:965
Geometry handler for line strings.
Definition: Basemap.h:972
void reset()
Resets the handler so that it can be reused.
PixelPositionGroupsI lineStrings_
The individual line strings.
Definition: Basemap.h:1001
void linestring_end()
This is called at the end of each linestring.
void linestring_point(vtzero::point point)
This is called once for each point.
void linestring_begin(uint32_t count)
This is called at the beginning of each linestring with the number of points in this linestring.
Geometry handler for points.
Definition: Basemap.h:893
void points_end()
This is called once at the end.
void reset()
Resets the handler so that it can be reused.
void points_begin(uint32_t count)
This is called once at the beginning with the number of points.
PixelPositionsI points_
The gathered points of this handler.
Definition: Basemap.h:922
void points_point(vtzero::point point)
This is called once for each point.
This class implements an object composed of inner and outer polygons.
Definition: Basemap.h:326
PixelPositionGroupsI innerPolygons_
The individual inner pologyons of this building.
Definition: Basemap.h:358
PixelPositionGroupsI outerPolygons_
The individual outer polygons of this building.
Definition: Basemap.h:355
const PixelPositionGroupsI & innerPolygons() const
Returns the individual inner poloyons of this building.
Definition: Basemap.h:1274
InnerOuterPolygonsObject(const ObjectType objectType, PixelPositionGroupsI &&outerPolygons, PixelPositionGroupsI &&innerPolygons, const unsigned int layerExtent)
Creates a new object.
Definition: Basemap.h:1261
const PixelPositionGroupsI & outerPolygons() const
Returns the individual outer polygons of this building.
Definition: Basemap.h:1269
This class implements a land use object.
Definition: Basemap.h:551
PixelPositionGroupsI lineStrings_
The individual line strings of this building.
Definition: Basemap.h:599
LandCoverType
Definition of individual land use types.
Definition: Basemap.h:558
@ LCT_GRASS
The land is covered with grass.
Definition: Basemap.h:562
@ LCT_PAVED
The land is paved.
Definition: Basemap.h:564
const PixelPositionGroupsI & lineStrings() const
Returns the line strings defining the shape of the transit in the domain of the layer to which this t...
Definition: Basemap.h:1340
LandCoverType landCoverType() const
Returns the type of the land use.
Definition: Basemap.h:1335
LandCover(const LandCoverType landCoverType, PixelPositionGroupsI &&outerPolygons, PixelPositionGroupsI &&innerPolygons, PixelPositionGroupsI &&lineStrings, const unsigned int layerExtent)
Creates a new land cover.
Definition: Basemap.h:1327
This class implements a land use object.
Definition: Basemap.h:486
LandUseType landUseType() const
Returns the type of the land use.
Definition: Basemap.h:1317
PixelPositionGroupsI lineStrings_
The individual line strings of this building.
Definition: Basemap.h:544
LandUseType
Definition of individual land use types.
Definition: Basemap.h:493
@ LUT_AIRPORT
The land use is an airport.
Definition: Basemap.h:497
@ LUT_PLAZA
The land use is a plaza.
Definition: Basemap.h:509
@ LUT_NATIONAL_PARK
The land use is a national park.
Definition: Basemap.h:507
@ LUT_AMUSEMENT
The land is used for amusement.
Definition: Basemap.h:499
@ LUT_EDUCATION
The land use is education.
Definition: Basemap.h:501
@ LUT_GREENSPACE
The land use is a green space.
Definition: Basemap.h:503
@ LUT_LAND
The land use is a land.
Definition: Basemap.h:505
const PixelPositionGroupsI & lineStrings() const
Returns the line strings defining the shape of the transit in the domain of the layer to which this t...
Definition: Basemap.h:1322
LandUse(const LandUseType landUseType, PixelPositionGroupsI &&outerPolygons, PixelPositionGroupsI &&innerPolygons, PixelPositionGroupsI &&lineStrings, const unsigned int layerExtent)
Creates a new land use.
Definition: Basemap.h:1309
This class is the base class for all map objects.
Definition: Basemap.h:56
ObjectType objectType() const
Returns the type of this object.
Definition: Basemap.h:1218
ObjectType
Definition of individual object types.
Definition: Basemap.h:63
@ OT_UNKNOWN
The object type is unknown.
Definition: Basemap.h:65
@ OT_LAND_COVER
The object is a land cover.
Definition: Basemap.h:69
@ OT_BUILDING
The object is a building.
Definition: Basemap.h:67
@ OT_ROAD
The object is a road.
Definition: Basemap.h:73
@ OT_LAND_USE
The object is a land use.
Definition: Basemap.h:71
@ OT_TRANSIT
The object is a transit.
Definition: Basemap.h:75
unsigned int layerExtent() const
Returns the extent of the layer in which this object is defined.
Definition: Basemap.h:1205
Object(const ObjectType objectType, const unsigned int layerExtent)
Creates a new object.
Definition: Basemap.h:1198
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...
Definition: Basemap.h:1210
This class implements a road object.
Definition: Basemap.h:124
std::unordered_map< std::string, RoadType > RoadTypeMap
Definition of an unordered map mapping road type strings to road type values.
Definition: Basemap.h:216
const PixelPositionGroupsI & lineStrings() const
Returns the line strings defining the shape of the road in the domain of the layer to which this road...
Definition: Basemap.h:1237
static RoadWidthMap defaultRoadWidthMap()
Returns the default map for road widths.
RoadType roadType_
The type of this road.
Definition: Basemap.h:258
std::string name_
The name of this road, if known.
Definition: Basemap.h:261
RoadType
Definition of individual road types.
Definition: Basemap.h:131
@ RT_LOCAL
A local street.
Definition: Basemap.h:159
@ RT_ACCESS
A road to provide access.
Definition: Basemap.h:135
@ RT_STEPS
A path/road with steps.
Definition: Basemap.h:189
@ RT_CROSSING
The road is a crossing.
Definition: Basemap.h:141
@ RT_SIDEWALK
The road is a sidewalk.
Definition: Basemap.h:187
@ RT_PARKING_AISLE
The road is a parking aisle.
Definition: Basemap.h:165
@ RT_DRIVEWAY
The road is a driveway.
Definition: Basemap.h:147
@ RT_LINK
A link.
Definition: Basemap.h:155
@ RT_ROAD
A default road.
Definition: Basemap.h:179
@ RT_SECONDARY
A secondary road.
Definition: Basemap.h:181
@ RT_HIGHWAY_LINK
A highway link.
Definition: Basemap.h:153
@ RT_PEDESTRIAN
A pedestrian road.
Definition: Basemap.h:169
@ RT_CROSSWALK
The road is a crosswalk.
Definition: Basemap.h:145
@ RT_MOTORWAY
A motorway.
Definition: Basemap.h:161
@ RT_TRACK
A track.
Definition: Basemap.h:195
@ RT_LIVING_STREET
A living street.
Definition: Basemap.h:157
@ RT_SERVICE
A service road.
Definition: Basemap.h:185
@ RT_MOTORWAY_LINK
A motorway link.
Definition: Basemap.h:163
@ RT_HIGHWAY
A highway.
Definition: Basemap.h:151
@ RT_RESIDENTIAL
A residential road.
Definition: Basemap.h:171
@ RT_SECONDARY_LINK
A secondary link.
Definition: Basemap.h:183
@ RT_CYCLEWAY
A cycleway.
Definition: Basemap.h:143
@ RT_PRIMARY_LINK
A primary link road.
Definition: Basemap.h:175
@ RT_PATH
The road is a path.
Definition: Basemap.h:167
@ RT_ALLEY
The road is an alley.
Definition: Basemap.h:137
@ RT_UNCLASSIFIED
An unclassified road.
Definition: Basemap.h:201
@ RT_FOOTWAY
The road is a footway.
Definition: Basemap.h:149
@ RT_RACEWAY
The road is a raceway.
Definition: Basemap.h:177
@ RT_TERTIARY
A tertiary road.
Definition: Basemap.h:191
@ RT_TRUNK_LINK
A trunk link.
Definition: Basemap.h:199
@ RT_TRUNK
A trunk road.
Definition: Basemap.h:197
@ RT_PRIMARY
A primary road.
Definition: Basemap.h:173
@ RT_BRIDLEWAY
The road is a bridleway (e.g., mainly used by horses).
Definition: Basemap.h:139
@ RT_TERTIARY_LINK
A tertiary link.
Definition: Basemap.h:193
RoadType roadType() const
Returns the type of this road.
Definition: Basemap.h:1232
static RoadType translateRoadType(const std::string &roadType)
Translates the string of a road type to a value.
std::unordered_map< RoadType, float > RoadWidthMap
Definition of an unordered map mapping road types to road widths.
Definition: Basemap.h:209
Road(const RoadType roadType, std::string &&name, PixelPositionGroupsI &&lineStrings, const unsigned int layerExtent)
Creates a new road.
Definition: Basemap.h:1223
PixelPositionGroupsI lineStrings_
The line strings defining the shape of the road in the domain of the layer to which this road belongs...
Definition: Basemap.h:264
This class stores the information belonging to one map tile.
Definition: Basemap.h:723
TileIndexPair tileIndexPair_
The tile index pair of the tile in latitude/vertical direction within the detail level,...
Definition: Basemap.h:876
static constexpr unsigned int numberTiles(const unsigned int level)
Returns the number of tiles in horizontal and vertical direction for a given detail level.
Definition: Basemap.h:1414
static void tileCoordinate2GPSLocation(const unsigned int level, const TileIndexPair &tileIndexPair, const PixelPositionI &position, const unsigned int layerExtent, double &latitude, double &longitude)
Returns the approximated GPS location of a position in a tile.
void clear()
Removes all map objects, the level and tile information is untought.
Tile & operator=(Tile &&tile)=default
Default move operator.
const TileIndexPair & tileIndexPair() const
Returns the tile index pair definining the tile's location.
Definition: Basemap.h:1399
static TileIndexPair calculateTile(const unsigned int level, const double latitude, const double longitude, double *latitudeTileFraction=nullptr, double *longitudeTileFraction=nullptr)
Calculates the tile in which a given GPS coordinate is located at a specified detail level.
SharedObjects objects_
The map objects of in this tile.
Definition: Basemap.h:879
static void calculateTileFractions(const unsigned int level, const double latitude, const double longitude, const TileIndexPair &tileIndexPair, double &latitudeTileFraction, double &longitudeTileFraction)
Calculates the tile fraction ini latitude and longitude for a given GPS coordinate in relation to a g...
double metricExtent(const double earthRadius=6378135.0) const
Returns the metric extent of this tile.
static double calculateNormalizedTileLongitude(const double longitude)
Calculates the tile in which a given GPS coordinate is located in longitude direction with sub-tile a...
void tileCoordinate2GPSLocation(const PixelPositionI &position, const unsigned int layerExtent, double &latitude, double &longitude) const
Returns the approximated GPS location of a position in this tile.
Tile(Tile &&tile)=default
Default move constructor.
unsigned int level() const
Returns the detail level of this tile.
Definition: Basemap.h:1394
bool parsePBFData(const void *data, const size_t size)
Parses a buffer containing the tile information as pbf file.
static double calculateNormalizedTileLatitude(const double latitude)
Calculates the tile in which a given GPS coordinate is located in latitude direction with sub-tile ac...
const SharedObjects & objects() const
Returns all objects of this tile.
Definition: Basemap.h:1404
Tile()=default
Default constructor creating an invalid tile.
bool isValid() const
Returns whether this tile is valid.
Definition: Basemap.h:1409
This class holds the tile indics in latitude and longitude direction.
Definition: Basemap.h:624
size_t operator()(const TileIndexPair &tileIndexPair) const
Hash function.
Definition: Basemap.h:1382
unsigned int latitudeIndex() const
Returns the tile index in latitude direction.
Definition: Basemap.h:1352
bool isLocationClose(const TileIndexPair &tileIndexPair, const double latitudeFraction, const double longitudeFraction, const double maxFraction=0.2) const
Returns whether a given location is close to this tile.
bool isInside(const unsigned int numberTiles) const
Returns whether this tile index pair is within the range of a maximal number of tiles.
Definition: Basemap.h:1362
static TileIndexPairs createNeighborhoodTiles(const TileIndexPair &tileIndexPair, const unsigned int numberTilesOnLevel, const unsigned int maxDistance)
Returns the tile index pairs of all neighboring tiles for a given center tile.
bool operator!=(const TileIndexPair &other) const
Returns whether two tile index pair objects hold not the same indices.
Definition: Basemap.h:1377
unsigned int longitudeIndex_
The tile index in longitude direction, with range [0, infinity).
Definition: Basemap.h:711
unsigned int longitudeIndex() const
Returns the tile index in longitude direction.
Definition: Basemap.h:1357
unsigned int latitudeIndex_
The tile index in latitude direction, with range [0, infinity).
Definition: Basemap.h:708
TileIndexPair()=default
Default constructor creating an invalid pair of indices.
bool operator==(const TileIndexPair &other) const
Returns whether two tile index pair objects hold the same indices.
Definition: Basemap.h:1372
bool isValid() const
Returns whether the this object holds valid tile indices.
Definition: Basemap.h:1367
This class implements a transit object.
Definition: Basemap.h:271
PixelPositionGroupsI lineStrings_
The line strings defining the shape of the transit in the domain of the layer to which this transit b...
Definition: Basemap.h:319
TransitType
Definition of individual transit types.
Definition: Basemap.h:278
@ TT_FERRY
A ferry.
Definition: Basemap.h:284
@ TT_AERIALWAY
Aerial transit way e.g., for planes.
Definition: Basemap.h:282
TransitType transitType_
The type of this transit.
Definition: Basemap.h:313
std::string name_
The name of this transit, if known.
Definition: Basemap.h:316
const PixelPositionGroupsI & lineStrings() const
Returns the line strings defining the shape of the transit in the domain of the layer to which this t...
Definition: Basemap.h:1256
TransitType transitType() const
Returns the type of this transit.
Definition: Basemap.h:1251
Transit(const TransitType transitType, std::string &&name, PixelPositionGroupsI &&lineStrings, const unsigned int layerExtent)
Creates a new transit object.
Definition: Basemap.h:1242
This class implements a water object.
Definition: Basemap.h:409
Water(const WaterType waterType, PixelPositionGroupsI &&outerPolygons, PixelPositionGroupsI &&innerPolygons, const unsigned int layerExtent)
Creates a new water.
Definition: Basemap.h:1297
std::unordered_map< std::string, WaterType > WaterTypeMap
Definition of an unordered map mapping water type strings to water type values.
Definition: Basemap.h:450
WaterType waterType() const
Returns the type of the water.
Definition: Basemap.h:1304
static WaterType translateWaterType(const std::string &waterType)
Translates the string of a water type to a value.
WaterType
Definition of individual water types.
Definition: Basemap.h:416
@ WT_OCEAN
The water is an ocean.
Definition: Basemap.h:430
@ WT_LAKE
The water is a lake.
Definition: Basemap.h:428
@ WT_HUMAN_MADE
The water is human made.
Definition: Basemap.h:424
@ WT_INLAND
An inland water.
Definition: Basemap.h:426
@ WT_POND
The water is a pond.
Definition: Basemap.h:432
@ WT_CANAL
The water is a canal.
Definition: Basemap.h:420
@ WT_WATER
The water without further specification.
Definition: Basemap.h:440
@ WT_DOCK
The water is a dock.
Definition: Basemap.h:422
@ WT_STREAM
The water is a stream.
Definition: Basemap.h:438
@ WT_RESERVOIR
The water is a reservoir.
Definition: Basemap.h:434
@ WT_RIVER
The water is a river.
Definition: Basemap.h:436
This class implements an parser of basemap data.
Definition: Basemap.h:33
std::vector< PixelPositionsI > PixelPositionGroupsI
Definition of groups of pixel positions.
Definition: Basemap.h:49
LayerType
Definition of individual layer types.
Definition: Basemap.h:1008
@ LT_LAND_USE
The layer holds land use information (mostly polygons for land usages).
Definition: Basemap.h:1030
@ LT_PLACE_LABEL
The layer holds place labels.
Definition: Basemap.h:1044
@ LT_LAND_USE_LABEL
The layer holds labels of land use (label point centroid for polygonal land usages).
Definition: Basemap.h:1032
@ LT_INDOOR_LABEL
The layer holds indoor label information (labels for indoor features).
Definition: Basemap.h:1026
@ LT_WATER_LABEL
The layer holds water label information (label point centroid for polygonal water).
Definition: Basemap.h:1060
@ LT_WATERWAY
The layer holds waterway information (linear water features).
Definition: Basemap.h:1058
@ LT_PARKING
The layer holds parking information (experimental parking layer, point & polygon).
Definition: Basemap.h:1040
@ LT_LANDMARK_POINT
The layer holds landmark point information.
Definition: Basemap.h:1034
@ LT_BUILDING_LABEL
The layer holds labels of buildings (label point centroid for polygonal structures).
Definition: Basemap.h:1020
@ LT_AREA_OF_INTEREST
The layer holds areas of interest (polygonal areas of interest).
Definition: Basemap.h:1014
@ LT_POI
The layer holds a point of interest.
Definition: Basemap.h:1046
@ LT_LAND_COVER
The layer holds land cover information (polygons for physical land features).
Definition: Basemap.h:1028
@ LT_TREE_POINT
The layer holds tree point information (point features for trees).
Definition: Basemap.h:1054
@ LT_WATER_OFFSET
The layer holds water offset information (polygons used for creating a shadow effect on inland water ...
Definition: Basemap.h:1064
@ LT_BORDER
The layer holds a border.
Definition: Basemap.h:1022
@ LT_TRANSIT_POINT
The layer holds transit point information (aerial, rail, ferry stations).
Definition: Basemap.h:1052
@ LT_NATURAL
The layer holds natural areas.
Definition: Basemap.h:1036
@ LT_BUILDING
The layer holds buildings (polygonal structures).
Definition: Basemap.h:1018
@ LT_AIRPORT
The layer holds information about an airport (point, line, & polygon airport features).
Definition: Basemap.h:1012
@ LT_INDOOR
The layer is an indoor layer (floor plans for meta offices, malls, airports).
Definition: Basemap.h:1024
@ LT_WAVE
The layer holds wave information (points used to show a wave icon over water).
Definition: Basemap.h:1066
@ LT_TRANSIT
The layer holds transit information (aerial, rail, ferry; linear features).
Definition: Basemap.h:1050
@ LT_BATHYMETRY
The layer holds bathymetry information (depth polygons for oceans).
Definition: Basemap.h:1016
@ LT_ROAD
The layer holds road data (linear features for roads, sidewalks).
Definition: Basemap.h:1048
@ LT_NATURAL_LABEL
The layer holds labels of natural areas.
Definition: Basemap.h:1038
@ LT_WATER_LINE
The layer holds water line information.
Definition: Basemap.h:1062
@ LT_WATER
The layer holds water information (polygonal water features).
Definition: Basemap.h:1056
@ LT_PLACENAME
The layer holds labels of places (point features for cities, neighborhoods).
Definition: Basemap.h:1042
static SharedTile newTileFromPBFData(const unsigned int level, const TileIndexPair &tileIndexPair, const void *data, const size_t size)
Creates a new tile based on given PBF data.
std::shared_ptr< Tile > SharedTile
Definition of a shared pointer holding a Tile.
Definition: Basemap.h:885
static SharedObject parseLandCover(vtzero::feature &vtzeroFeature, PixelPositionGroupsI &&outerPolygons, PixelPositionGroupsI &&innerPolygons, PixelPositionGroupsI &&lineStrings, const unsigned int layerExtent)
Parses a land cover feature.
static bool numberFromPropertyValue(const vtzero::property_value &propertyValue, double &value)
Returns the value of a property value as number.
static SharedObject parseRoad(vtzero::feature &vtzeroFeature, PixelPositionGroupsI &&lineStrings, const unsigned int layerExtent)
Parses a road feature.
CV::PixelPositionI PixelPositionI
Definition of a location with signed pixel precision.
Definition: Basemap.h:39
std::vector< TileIndexPair > TileIndexPairs
Definition of a vector holding tile index pairs.
Definition: Basemap.h:613
std::unordered_set< TileIndexPair, TileIndexPair > TileIndexPairSet
Definition of a set holding tile index pairs.
Definition: Basemap.h:717
static bool extractTileUrlTemplate(const char *styleData, const size_t styleSize, std::string &urlTemplate)
Gets the url template for downloading a map tile.
static const std::string & styleUrl()
Returns the url for downloading the map style data.
std::unordered_map< std::string, LayerType > LayerTypeMap
Definition of an unordered map mapping layer type strings to layer type values.
Definition: Basemap.h:1074
static SharedObject parseWater(vtzero::feature &vtzeroFeature, PixelPositionGroupsI &&outerPolygons, PixelPositionGroupsI &&innerPolygons, const unsigned int layerExtent)
Parses a water feature.
std::vector< SharedObject > SharedObjects
Definition of a vector holding shared objects.
Definition: Basemap.h:610
static bool constructTileUrl(const std::string urlTemplate, const unsigned int level, const TileIndexPair &tileIndexPair, std::string &url)
Constructs the url for downloading a map tile.
CV::PixelPositionsI PixelPositionsI
Definition of a vector holding locations with signed pixel precision.
Definition: Basemap.h:44
static SharedObject parseBuilding(vtzero::feature &vtzeroFeature, PixelPositionGroupsI &&outerPolygons, PixelPositionGroupsI &&innerPolygons, PixelPositionGroupsI &&lineStrings, const unsigned int layerExtent)
Parses a building feature.
std::shared_ptr< Object > SharedObject
Definition of a shared pointer holding an Object.
Definition: Basemap.h:605
static LayerType translateLayerName(const std::string &layerName)
Translates the name of a layer to the corresponding layer type.
static SharedObject parseLandUse(vtzero::feature &vtzeroFeature, PixelPositionGroupsI &&outerPolygons, PixelPositionGroupsI &&innerPolygons, PixelPositionGroupsI &&lineStrings, const unsigned int layerExtent)
Parses a land use feature.
static SharedObject parseTransit(vtzero::feature &vtzeroFeature, PixelPositionGroupsI &&lineStrings, const unsigned int layerExtent)
Parses a transit feature.
static constexpr T eps()
Returns a small epsilon.
std::vector< PixelPositionI > PixelPositionsI
Definition of a vector holding pixel positions (with positive and negative coordinate values).
Definition: PixelPosition.h:55
float Scalar
Definition of a scalar type.
Definition: Math.h:128
VectorT2< Scalar > Vector2
Definition of a 2D vector.
Definition: Vector2.h:21
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15