Libosmium
2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
|
Everything related to geometry handling. More...
Namespaces | |
namespace | haversine |
Functions to calculate arc distance on Earth using the haversine formula. | |
Classes | |
struct | Coordinates |
class | CRS |
class | GeometryFactory |
class | IdentityProjection |
class | MercatorProjection |
class | Projection |
struct | Tile |
Typedefs | |
template<typename TProjection = IdentityProjection> | |
using | GeoJSONFactory = GeometryFactory< osmium::geom::detail::GeoJSONFactoryImpl, TProjection > |
template<typename TProjection = IdentityProjection> | |
using | OGRFactory = GeometryFactory< osmium::geom::detail::OGRFactoryImpl, TProjection > |
template<typename TWriter , typename TProjection = IdentityProjection> | |
using | RapidGeoJSONFactory = GeometryFactory< detail::RapidGeoJSONFactoryImpl< TWriter >, TProjection > |
template<typename TProjection = IdentityProjection> | |
using | WKBFactory = GeometryFactory< osmium::geom::detail::WKBFactoryImpl, TProjection > |
template<typename TProjection = IdentityProjection> | |
using | WKTFactory = GeometryFactory< osmium::geom::detail::WKTFactoryImpl, TProjection > |
Enumerations | |
enum class | use_nodes : bool { unique = true , all = false } |
enum class | direction : bool { backward = true , forward = false } |
enum class | wkb_type : bool { wkb = false , ewkb = true } |
enum class | out_type : bool { binary = false , hex = true } |
enum class | wkt_type : bool { wkt = false , ewkt = true } |
Functions | |
bool | operator== (const Coordinates &lhs, const Coordinates &rhs) noexcept |
bool | operator!= (const Coordinates &lhs, const Coordinates &rhs) noexcept |
template<typename TChar , typename TTraits > | |
std::basic_ostream< TChar, TTraits > & | operator<< (std::basic_ostream< TChar, TTraits > &out, const Coordinates &c) |
Coordinates | lonlat_to_mercator (const Coordinates &c) |
Coordinates | mercator_to_lonlat (const Coordinates &c) |
OSMIUM_DEPRECATED Coordinates | transform (const CRS &src, const CRS &dest, Coordinates c) |
bool | contains (const osmium::Box &lhs, const osmium::Box &rhs) noexcept |
bool | overlaps (const osmium::Box &lhs, const osmium::Box &rhs) noexcept |
constexpr uint32_t | num_tiles_in_zoom (uint32_t zoom) noexcept |
constexpr double | tile_extent_in_zoom (uint32_t zoom) noexcept |
constexpr uint32_t | mercx_to_tilex (uint32_t zoom, double x) noexcept |
constexpr uint32_t | mercy_to_tiley (uint32_t zoom, double y) noexcept |
bool | operator== (const Tile &lhs, const Tile &rhs) noexcept |
Tiles are equal if all their attributes are equal. More... | |
bool | operator!= (const Tile &lhs, const Tile &rhs) noexcept |
bool | operator< (const Tile &lhs, const Tile &rhs) noexcept |
constexpr double | deg_to_rad (double degree) noexcept |
Convert angle from degrees to radians. More... | |
constexpr double | rad_to_deg (double radians) noexcept |
Convert angle from radians to degrees. More... | |
Variables | |
constexpr double | MERCATOR_MAX_LAT = 85.0511288 |
constexpr double | PI = 3.14159265358979323846 |
Everything related to geometry handling.
using osmium::geom::GeoJSONFactory = typedef GeometryFactory<osmium::geom::detail::GeoJSONFactoryImpl, TProjection> |
using osmium::geom::OGRFactory = typedef GeometryFactory<osmium::geom::detail::OGRFactoryImpl, TProjection> |
using osmium::geom::RapidGeoJSONFactory = typedef GeometryFactory<detail::RapidGeoJSONFactoryImpl<TWriter>, TProjection> |
using osmium::geom::WKBFactory = typedef GeometryFactory<osmium::geom::detail::WKBFactoryImpl, TProjection> |
using osmium::geom::WKTFactory = typedef GeometryFactory<osmium::geom::detail::WKTFactoryImpl, TProjection> |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
inlinenoexcept |
Check whether one geometry contains another.
|
inlineconstexprnoexcept |
Convert angle from degrees to radians.
|
inline |
Convert the coordinates from WGS84 lon/lat to web mercator.
|
inline |
Convert the coordinates from web mercator to WGS84 lon/lat.
|
inlineconstexprnoexcept |
Get the tile x number from an x coordinate in web mercator projection in the given zoom level. Tiles are numbered from left to right.
|
inlineconstexprnoexcept |
Get the tile y number from an y coordinate in web mercator projection in the given zoom level. Tiles are numbered from top to bottom.
|
inlineconstexprnoexcept |
Returns the number of tiles (in each direction) for the given zoom level.
|
inlinenoexcept |
This defines an arbitrary order on tiles for use in std::map etc.
|
inline |
|
inlinenoexcept |
Check whether two Coordinates are equal. Invalid coordinates are equal to other invalid coordinates but not equal to any valid coordinates.
Because this is comparing floating point values, it might not give the right result if the coordinates have been the result of some calculation that introduced rounding errors.
Tiles are equal if all their attributes are equal.
|
inlinenoexcept |
Check whether one geometry overlaps another.
|
inlineconstexprnoexcept |
Convert angle from radians to degrees.
|
inlineconstexprnoexcept |
Returns the width or height of a tile in web mercator coordinates for the given zoom level.
|
inline |
Transform coordinates from one CRS into another. Wraps the same function of the proj library.
Coordinates have to be in radians and are produced in radians.
osmium::projection_error | if the projection fails |
|
constexpr |
The maximum latitude that can be projected with the Web Mercator (EPSG:3857) projection.
|
constexpr |