[PROJ] Affine transformation using DERIVEDPROJCRS
Bart.Duijndam at ziggo.nl
Bart.Duijndam at ziggo.nl
Sat Jul 9 07:05:32 PDT 2022
Hi Even,
You mentioned that in order to have ID["EPSG",9624]] included into the WKT2 string, you need to add it to the PropertyMap with
.set(metadata::Identifier::CODESPACE_KEY, metadata::Identifier::EPSG)
.set(metadata::Identifier::CODE_KEY, 9624)
I appreciate this, but the question is *where* do this.
I have done so in the creation of the DerivedProjCRS object as follows:
PropertyMap properties;
properties
.set(IdentifiedObject::NAME_KEY, "Abtswoudsebrug")
.set(Identifier::CODESPACE_KEY, Identifier::EPSG)
.set(Identifier::CODE_KEY, 9624);
return DerivedProjectedCRS::create(
properties,
createProjected_v2(), derivingConversion,
CartesianCS::createEastingNorthing(UnitOfMeasure::METRE));
The original code was :
return DerivedProjectedCRS::create(
PropertyMap().set(IdentifiedObject::NAME_KEY, "Abtswoudsebrug"),
createProjected_v2(), derivingConversion,
CartesianCS::createEastingNorthing(UnitOfMeasure::METRE));
But the net result is that ID[\"EPSG\",9624]] gets appended to the very end of the WKT2-string, which is incorrect.
So, I struggle with this topic.
It’s a pity that an example WKT2 string is given in test_crs here <https://github.com/OSGeo/PROJ/blob/a390c57ab5998154535d7ffbc7de04aad2a73910/test/unit/test_crs.cpp#L5340> , but the string hasn’t been derived from code…
Obviously, I have similar problems with the Affine transformation parameters: 8623, 8624, 8625, 8639, 8640 and 8641.
Kind regards,
Bart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20220709/f9d7b82d/attachment.htm>
More information about the PROJ
mailing list