diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-14 14:59:27 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-14 14:59:27 +0100 |
| commit | ba313759523d6d24f7e027f5ddae230656141b3b (patch) | |
| tree | f80872c682383fee0e5f232bcc3ced2e4bdb4bc9 /src/crs.cpp | |
| parent | 4638b45730ab29b2891e57474fa9ee130d6b38a4 (diff) | |
| download | PROJ-ba313759523d6d24f7e027f5ddae230656141b3b.tar.gz PROJ-ba313759523d6d24f7e027f5ddae230656141b3b.zip | |
Advanced C API: add proj_obj_alter_id()
Diffstat (limited to 'src/crs.cpp')
| -rw-r--r-- | src/crs.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/crs.cpp b/src/crs.cpp index 10bec815..d873e81b 100644 --- a/src/crs.cpp +++ b/src/crs.cpp @@ -574,6 +574,22 @@ CRSNNPtr CRS::alterName(const std::string &newName) const { // --------------------------------------------------------------------------- +//! @cond Doxygen_Suppress + +CRSNNPtr CRS::alterId(const std::string &authName, + const std::string &code) const { + auto crs = shallowClone(); + auto props = util::PropertyMap(); + props.set(metadata::Identifier::CODESPACE_KEY, authName) + .set(metadata::Identifier::CODE_KEY, code); + crs->setProperties(props); + return crs; +} + +//! @endcond + +// --------------------------------------------------------------------------- + /** \brief Identify the CRS with reference CRSs. * * The candidate CRSs are either hard-coded, or looked in the database when |
