diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-11-14 17:40:42 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-11-14 22:48:29 +0100 |
| commit | d928db15d53805d9b728b440079756081961c536 (patch) | |
| tree | e862a961d26bedb34c58e4f28ef0bdeedb5f3225 /include/proj/internal/io_internal.hpp | |
| parent | 330e8bf686f9c4524075ca1ff50cbca6c9e091da (diff) | |
| download | PROJ-d928db15d53805d9b728b440079756081961c536.tar.gz PROJ-d928db15d53805d9b728b440079756081961c536.zip | |
Implement RFC 2: Initial integration of "GDAL SRS barn" work
This work mostly consists of:
- a C++ implementation of the ISO-19111:2018 / OGC Topic 2
"Referencing by coordinates" classes to represent Datums,
Coordinate systems, CRSs (Coordinate Reference Systems) and
Coordinate Operations.
- methods to convert between this C++ modeling and WKT1, WKT2
and PROJ string representations of those objects
- management and query of a SQLite3 database of CRS and Coordinate Operation definition
- a C API binding part of those capabilities
This is all-in-one squashed commit of the work of
https://github.com/OSGeo/proj.4/pull/1040
Diffstat (limited to 'include/proj/internal/io_internal.hpp')
| -rw-r--r-- | include/proj/internal/io_internal.hpp | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/include/proj/internal/io_internal.hpp b/include/proj/internal/io_internal.hpp new file mode 100644 index 00000000..8a32c6eb --- /dev/null +++ b/include/proj/internal/io_internal.hpp @@ -0,0 +1,163 @@ +/****************************************************************************** + * + * Project: PROJ + * Purpose: ISO19111:2018 implementation + * Author: Even Rouault <even dot rouault at spatialys dot com> + * + ****************************************************************************** + * Copyright (c) 2018, Even Rouault <even dot rouault at spatialys dot com> + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + ****************************************************************************/ + +#ifndef FROM_PROJ_CPP +#error This file should only be included from a PROJ cpp file +#endif + +#ifndef IO_INTERNAL_HH_INCLUDED +#define IO_INTERNAL_HH_INCLUDED + +#include <string> +#include <vector> + +#include "proj/util.hpp" + +//! @cond Doxygen_Suppress + +NS_PROJ_START + +namespace io { + +// --------------------------------------------------------------------------- + +class WKTConstants { + public: + // WKT1 + static const std::string GEOCCS; + static const std::string GEOGCS; + static const std::string DATUM; // WKT2 preferred too + static const std::string UNIT; + static const std::string SPHEROID; + static const std::string AXIS; // WKT2 too + static const std::string PRIMEM; // WKT2 too + static const std::string AUTHORITY; + static const std::string PROJCS; + static const std::string PROJECTION; + static const std::string PARAMETER; // WKT2 too + static const std::string VERT_CS; + static const std::string VERT_DATUM; + static const std::string COMPD_CS; + static const std::string TOWGS84; // WKT1 only + static const std::string EXTENSION; // WKT1 only - GDAL specific + static const std::string LOCAL_CS; // WKT1 only + static const std::string LOCAL_DATUM; // WKT1 only + + // WKT2 preferred + static const std::string GEODCRS; + static const std::string LENGTHUNIT; + static const std::string ANGLEUNIT; + static const std::string SCALEUNIT; + static const std::string TIMEUNIT; + static const std::string ELLIPSOID; + static const std::string CS; + static const std::string ID; + static const std::string PROJCRS; + static const std::string BASEGEODCRS; + static const std::string MERIDIAN; + static const std::string ORDER; + static const std::string ANCHOR; + static const std::string CONVERSION; + static const std::string METHOD; + static const std::string REMARK; + static const std::string GEOGCRS; // WKT2-2018 + static const std::string BASEGEOGCRS; // WKT2-2018 + static const std::string SCOPE; + static const std::string AREA; + static const std::string BBOX; + static const std::string CITATION; + static const std::string URI; + static const std::string VERTCRS; + static const std::string VDATUM; + static const std::string COMPOUNDCRS; + static const std::string PARAMETERFILE; + static const std::string COORDINATEOPERATION; + static const std::string SOURCECRS; + static const std::string TARGETCRS; + static const std::string INTERPOLATIONCRS; + static const std::string OPERATIONACCURACY; + static const std::string CONCATENATEDOPERATION; // WKT2-2018 + static const std::string STEP; // WKT2-2018 + static const std::string BOUNDCRS; + static const std::string ABRIDGEDTRANSFORMATION; + static const std::string DERIVINGCONVERSION; + static const std::string TDATUM; + static const std::string CALENDAR; // WKT2-2018 + static const std::string TIMEORIGIN; + static const std::string TIMECRS; + static const std::string VERTICALEXTENT; + static const std::string TIMEEXTENT; + static const std::string USAGE; // WKT2-2018 + static const std::string DYNAMIC; // WKT2-2018 + static const std::string FRAMEEPOCH; // WKT2-2018 + static const std::string MODEL; // WKT2-2018 + static const std::string VELOCITYGRID; // WKT2-2018 + static const std::string ENSEMBLE; // WKT2-2018 + static const std::string MEMBER; // WKT2-2018 + static const std::string ENSEMBLEACCURACY; // WKT2-2018 + static const std::string DERIVEDPROJCRS; // WKT2-2018 + static const std::string BASEPROJCRS; // WKT2-2018 + static const std::string EDATUM; + static const std::string ENGCRS; + static const std::string PDATUM; + static const std::string PARAMETRICCRS; + static const std::string PARAMETRICUNIT; + static const std::string BASEVERTCRS; + static const std::string BASEENGCRS; + static const std::string BASEPARAMCRS; + static const std::string BASETIMECRS; + + // WKT2 alternate (longer or shorter) + static const std::string GEODETICCRS; + static const std::string GEODETICDATUM; + static const std::string PROJECTEDCRS; + static const std::string PRIMEMERIDIAN; + static const std::string GEOGRAPHICCRS; // WKT2-2018 + static const std::string TRF; // WKT2-2018 + static const std::string VERTICALCRS; + static const std::string VERTICALDATUM; + static const std::string VRF; // WKT2-2018 + static const std::string TIMEDATUM; + static const std::string ENGINEERINGDATUM; + static const std::string ENGINEERINGCRS; + static const std::string PARAMETRICDATUM; + + static const std::vector<std::string> &constants() { return constants_; } + + private: + static std::vector<std::string> constants_; + static const char *createAndAddToConstantList(const char *text); +}; + +} // namespace io + +NS_PROJ_END + +//! @endcond + +#endif // IO_INTERNAL_HH_INCLUDED |
