Fishnet 2.0.1
Framework for Graph-Based Analysis of GIS Vector Data
Loading...
Searching...
No Matches
fishnet::WGS84Ellipsoid Class Reference

Utility class for computing distances and areas in metric units for GIS data using the WGS84 Spatial Reference System. More...

#include <WGS84Ellipsoid.hpp>

Static Public Member Functions

static double distance (double lambdaA, double phiA, double lambdaB, double phiB, bool exact=true)
 
static double distance (fishnet::geometry::IPoint auto const &p, fishnet::geometry::IPoint auto const &q, bool exact=true) noexcept
 Compute the distance between two points in metric units.
 
static double area (fishnet::geometry::Shape auto const &shape)
 

Static Public Attributes

static constexpr double flattening = 1.0 / 298.257223563
 
static constexpr double radiusInMeter = 6378137
 
static OGRSpatialReference spatialReference = initWGS84()
 

Detailed Description

Utility class for computing distances and areas in metric units for GIS data using the WGS84 Spatial Reference System.

Member Function Documentation

◆ area()

static double fishnet::WGS84Ellipsoid::area ( fishnet::geometry::Shape auto const &  shape)
inlinestatic

Calculate the area of a Shape in m² by projection

Parameters
shapeShape to calculate the area of
Deprecated:
Exceptions
runtime_errorwhen the projection to metric fails
Returns
area in m²

◆ distance() [1/2]

static double fishnet::WGS84Ellipsoid::distance ( double  lambdaA,
double  phiA,
double  lambdaB,
double  phiB,
bool  exact = true 
)
inlinestatic
Parameters
lambdaAlongitude of point A
phiAlatitude of point A
lambdaBlongitude of point B
phiBlatitude of point B
exactapplies additional correction for the distances For further reading consider: https://de.wikipedia.org/wiki/Orthodrome
Returns
distance between A and B in meters

◆ distance() [2/2]

static double fishnet::WGS84Ellipsoid::distance ( fishnet::geometry::IPoint auto const &  p,
fishnet::geometry::IPoint auto const &  q,
bool  exact = true 
)
inlinestaticnoexcept

Compute the distance between two points in metric units.

Parameters
ppoint (long,lat)
qpoint (long,lat)
exactapplies additional correction for the distances
Returns
distance between p and q in meters

Member Data Documentation

◆ flattening

constexpr double fishnet::WGS84Ellipsoid::flattening = 1.0 / 298.257223563
staticconstexpr

◆ radiusInMeter

constexpr double fishnet::WGS84Ellipsoid::radiusInMeter = 6378137
staticconstexpr

◆ spatialReference

OGRSpatialReference fishnet::WGS84Ellipsoid::spatialReference = initWGS84()
inlinestatic

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