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/coordinatesystem_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/coordinatesystem_internal.hpp')
| -rw-r--r-- | include/proj/internal/coordinatesystem_internal.hpp | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/include/proj/internal/coordinatesystem_internal.hpp b/include/proj/internal/coordinatesystem_internal.hpp new file mode 100644 index 00000000..63c5f7af --- /dev/null +++ b/include/proj/internal/coordinatesystem_internal.hpp @@ -0,0 +1,104 @@ +/****************************************************************************** + * + * 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 COORDINATESYSTEM_INTERNAL_HH_INCLUDED +#define COORDINATESYSTEM_INTERNAL_HH_INCLUDED + +#include "proj/util.hpp" + +#include <map> +#include <set> +#include <string> + +//! @cond Doxygen_Suppress + +NS_PROJ_START + +namespace cs { + +// --------------------------------------------------------------------------- + +class AxisDirectionWKT1 : public util::CodeList { + public: + static const AxisDirectionWKT1 *valueOf(const std::string &nameIn); + + static const AxisDirectionWKT1 NORTH; + static const AxisDirectionWKT1 SOUTH; + static const AxisDirectionWKT1 EAST; + static const AxisDirectionWKT1 WEST; + static const AxisDirectionWKT1 UP; + static const AxisDirectionWKT1 DOWN; + static const AxisDirectionWKT1 OTHER; + + private: + explicit AxisDirectionWKT1(const std::string &nameIn); + + static std::map<std::string, const AxisDirectionWKT1 *> registry; +}; + +// --------------------------------------------------------------------------- + +class AxisName { + public: + static const std::string Longitude; + static const std::string Latitude; + static const std::string Easting; + static const std::string Northing; + static const std::string Westing; + static const std::string Southing; + static const std::string Ellipsoidal_height; + static const std::string Geocentric_X; + static const std::string Geocentric_Y; + static const std::string Geocentric_Z; +}; + +// --------------------------------------------------------------------------- + +class AxisAbbreviation { + public: + static const std::string lon; + static const std::string lat; + static const std::string E; + static const std::string N; + static const std::string h; + static const std::string X; + static const std::string Y; + static const std::string Z; +}; + +} // namespace cs + +NS_PROJ_END + +//! @endcond + +#endif // COORDINATESYSTEM_INTERNAL_HH_INCLUDED |
