GDAL

ogr_geomcoordinateprecision.h
1/******************************************************************************
2 *
3 * Project: OpenGIS Simple Features Reference Implementation
4 * Purpose: Definition of OGRGeomCoordinatePrecision.
5 * Author: Even Rouault <even dot rouault at spatialys.com>
6 *
7 ******************************************************************************
8 * Copyright (c) 2024, Even Rouault <even dot rouault at spatialys.com>
9 *
10 * SPDX-License-Identifier: MIT
11 ****************************************************************************/
12
13#ifndef OGR_GEOMCOORDINATEPRECISION_H
14#define OGR_GEOMCOORDINATEPRECISION_H
15
16#if !defined(DOXYGEN_SKIP)
17#include <map>
18#include "cpl_string.h"
19#endif
20
21 class OGRSpatialReference;
22
33 struct CPL_DLL OGRGeomCoordinatePrecision
34{
36 static constexpr double UNKNOWN = 0;
37
46 double dfXYResolution = UNKNOWN;
47
52 double dfZResolution = UNKNOWN;
53
57 double dfMResolution = UNKNOWN;
58
66 std::map<std::string, CPLStringList> oFormatSpecificOptions{};
67
68 void SetFromMeter(const OGRSpatialReference *poSRS,
69 double dfXYMeterResolution, double dfZMeterResolution,
70 double dfMResolution);
71
72 OGRGeomCoordinatePrecision
73 ConvertToOtherSRS(const OGRSpatialReference *poSRSSrc,
74 const OGRSpatialReference *poSRSDst) const;
75
76 static int ResolutionToPrecision(double dfResolution);
77};
78
79#endif /* OGR_GEOMCOORDINATEPRECISION_H */
OGRSpatialReference
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:153
cpl_string.h
Various convenience functions for working with strings and string lists.
OGRGeomCoordinatePrecision
Geometry coordinate precision.
Definition: ogr_geomcoordinateprecision.h:34