[PROJ] alterCSLinearUnit for BoundCRS

Even Rouault even.rouault at spatialys.com
Thu Sep 15 09:50:06 PDT 2022


Javier,

Le 15/09/2022 à 17:56, Javier Jimenez Shaw a écrit :
> Hi
>
> I am considering to make a PR that implements alterCSLinearUnit for 
> BoundCRS (as far as I understand, it is not covered). My question is: 
> is it enough to apply alterCSLinearUnit to the baseCRS, leaving the 
> hubCRS and transformation the same? I would say so, but I do not know 
> if there is any side effect I am missing.

Yes, I believe you should only touch the baseCRS of the boundCRS. At 
least if the baseCRS is a projected CRS, based on 
http://docs.opengeospatial.org/is/18-010r7/18-010r7.html#149: "If the 
source CRS type is projected and the abridged coordinate transformation 
operates in the geodetic CRS domain, the transformation is deemed to 
operate on the projected CRS's base CRS but the projected CRS shall be 
described."

Said otherwise, the conversion & coordinate system of the projected CRS 
are not taken into account for the coordinate operation described by the 
boundCRS. Only the (base) geographicCRS of the projectedCRS is.

Even

PS:

The "interesting" case would be a BoundCRS with baseCRS = Geographic3D 
CRS (let's say ETRS89 3D) , targetCRS = Geographic 3D CRS (let's say 
WGS84 3D) and transformation = some Helmert. If you had the crazy idea 
of altering the vertical unit of the ellipsoidal height to be feet (hum, 
is that crazy? who knows what non-metric folks can do :-)) for the 
baseCRS, I'm not sure at all PROJ would do. I guess the expected 
behaviour when transforming between such baseCRS with feet vertical unit 
and the targetCRS would be first to apply feet -> meter and then chain 
with the Helmert transformation. Perhaps this is what we do currently.

actually, checking... yes this works:

$ projinfo -s "+proj=longlat +ellps=GRS80 +towgs84=1,2,3 +vunits=ft 
+type=crs" -t EPSG:4979

PROJ string:
+proj=pipeline
   +step +proj=unitconvert +xy_in=deg +z_in=ft +xy_out=rad +z_out=m
   +step +proj=cart +ellps=GRS80
   +step +proj=helmert +x=1 +y=2 +z=3
   +step +inv +proj=cart +ellps=WGS84
   +step +proj=unitconvert +xy_in=rad +z_in=m +xy_out=deg +z_out=m
   +step +proj=axisswap +order=2,1

>
> The use case I am thinking about: having a bound 2D (projected) system 
> in something that is not meters (let's say foot). Then if I do 
> promoteTo3D, the vertical will be meters, and I want to change the 
> units to the same as the horizontal ones. It works fine for projected, 
> but not yet for bound.
>
> Thanks.
> .___ ._ ..._ .. . ._. .___ .. __ . _. . __..  ... .... ._ .__
> Entre dos pensamientos racionales
> hay infinitos pensamientos irracionales.
>
>
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20220915/8e511097/attachment.htm>


More information about the PROJ mailing list