NGen
Loading...
Searching...
No Matches
hy_features::attributes::area_from_geometry_visitor Struct Reference

Measures whichever geometries enclose an area; anything else has none to give. More...

#include <HY_Features_Attributes.hpp>

+ Collaboration diagram for hy_features::attributes::area_from_geometry_visitor:

Public Member Functions

std::optional< double > operator() (const geojson::polygon_t &polygon) const
 
std::optional< double > operator() (const geojson::multipolygon_t &multipolygon) const
 
template<typename T >
std::optional< double > operator() (const T &) const
 A point or a line bounds nothing.
 

Detailed Description

Measures whichever geometries enclose an area; anything else has none to give.

The coordinates have to be WGS84 longitude/latitude in degrees. geojson::coordinate_t declares that coordinate system in its type, which is what makes boost::geometry measure on a spheroid – WGS84 by default – and answer in square meters; the same ring in a cartesian type would measure in square degrees and be meaningless as an extent. Both input formats satisfy the requirement: GeoJSON is WGS84 by definition, and the GeoPackage reader reprojects to EPSG:4326 as it builds the geometry.

Member Function Documentation

◆ operator()() [1/3]

std::optional< double > hy_features::attributes::area_from_geometry_visitor::operator() ( const geojson::multipolygon_t & multipolygon) const
inline

◆ operator()() [2/3]

std::optional< double > hy_features::attributes::area_from_geometry_visitor::operator() ( const geojson::polygon_t & polygon) const
inline

◆ operator()() [3/3]

template<typename T >
std::optional< double > hy_features::attributes::area_from_geometry_visitor::operator() ( const T & ) const
inline

A point or a line bounds nothing.


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