[PROJ] Units in a derived system

Javier Jimenez Shaw j1 at jimenezshaw.com
Wed Aug 3 12:48:56 PDT 2022


Continuing with the tests, I see that the axis ordering is also ignored.
If I just modify EPSG:6507 to be northing-easting, I see that the output is
swapped:

cat ne.wkt

PROJCRS["NAD83(2011) / Mississippi East (ftUS)",
    BASEGEOGCRS["NAD83(2011)",
        DATUM["NAD83 (National Spatial Reference System 2011)",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",6318]],
    CONVERSION["SPCS83 Mississippi East zone (US Survey feet)",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",29.5,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",-88.8333333333333,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",0.99995,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",984250,
            LENGTHUNIT["US survey foot",0.304800609601219],
            ID["EPSG",8806]],
        PARAMETER["False northing",0,
            LENGTHUNIT["US survey foot",0.304800609601219],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["northing (Y)",north,
            ORDER[1],
            LENGTHUNIT["US survey foot",0.304800609601219]],
        AXIS["easting (X)",east,
            ORDER[2],
            LENGTHUNIT["US survey foot",0.304800609601219]],
    USAGE[
        SCOPE["Engineering survey, topographic mapping."],
        AREA["United States (USA) - Mississippi - counties of Alcorn;
Attala; Benton; Calhoun; Chickasaw; Choctaw; Clarke; Clay; Covington;
Forrest; George; Greene; Hancock; Harrison; Itawamba; Jackson; Jasper;
Jones; Kemper; Lafayette; Lamar; Lauderdale; Leake; Lee; Lowndes; Marshall;
Monroe; Neshoba; Newton; Noxubee; Oktibbeha; Pearl River; Perry; Pontotoc;
Prentiss; Scott; Smith; Stone; Tippah; Tishomingo; Union; Wayne; Webster;
Winston."],
        BBOX[30.01,-89.97,35.01,-88.09]]]

$ echo 29 -88 0 | cs2cs EPSG:6318 EPSG:6507
1250642.38 -180875.29 0.00
$ echo 29 -88 0 | cs2cs EPSG:6318 "$(cat ne.wkt)"
-180875.29 1250642.38 0.00

However, If I swap the axes of the derived crs wtk2 string, the values are
not swapped (not added here for brevity).

It looks like the whole info about the CS in the derived CRS (units and
order of the axis) is ignored.

.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
Entre dos pensamientos racionales
hay infinitos pensamientos irracionales.



On Wed, 3 Aug 2022 at 19:52, Javier Jimenez Shaw <j1 at jimenezshaw.com> wrote:

> Hi
>
> I am trying to make a derived projected CRS... in feet.
> The conversion method is a "PROJ-based operation method" with an affine
> transformation (simplified here with just xoff of 20 feet).
> https://proj.org/operations/transformations/affine.html
>
> The derived system is something like this (my data is 3D, but in 2D is
> also reproduced):
>
> $ cat derived.wkt
>
> DERIVEDPROJCRS["Custom Site Calibrated CRS",
>     BASEPROJCRS["NAD83(2011) / Mississippi East (ftUS)",
>         BASEGEOGCRS["NAD83(2011)",
>             DATUM["NAD83 (National Spatial Reference System 2011)",
>                 ELLIPSOID["GRS 1980",6378137,298.257222101,
>                     LENGTHUNIT["metre",1]]],
>             PRIMEM["Greenwich",0,
>                 ANGLEUNIT["degree",0.0174532925199433]]],
>         CONVERSION["SPCS83 Mississippi East zone (US Survey feet)",
>             METHOD["Transverse Mercator",
>                 ID["EPSG",9807]],
>             PARAMETER["Latitude of natural origin",29.5,
>                 ANGLEUNIT["degree",0.0174532925199433],
>                 ID["EPSG",8801]],
>             PARAMETER["Longitude of natural origin",-88.8333333333333,
>                 ANGLEUNIT["degree",0.0174532925199433],
>                 ID["EPSG",8802]],
>             PARAMETER["Scale factor at natural origin",0.99995,
>                 SCALEUNIT["unity",1],
>                 ID["EPSG",8805]],
>             PARAMETER["False easting",984250,
>                 LENGTHUNIT["US survey foot",0.304800609601219],
>                 ID["EPSG",8806]],
>             PARAMETER["False northing",0,
>                 LENGTHUNIT["US survey foot",0.304800609601219],
>                 ID["EPSG",8807]]]],
>     DERIVINGCONVERSION["Affine transformation as PROJ-based",
>         METHOD["PROJ-based operation method: +proj=pipeline +step
> +proj=affine +xoff=20"]],
>     CS[Cartesian,2],
>         AXIS["easting (X)",east,
>             ORDER[1],
>             LENGTHUNIT["US survey foot",0.304800609601219]],
>         AXIS["northing (Y)",north,
>             ORDER[2],
>             LENGTHUNIT["US survey foot",0.304800609601219]],
>     REMARK["EPSG:6507 with 20 feet offset"]]
>
> But the output I get seems to be in meters (I deduced that running with
> PROJ_DEBUG=3) It is kind of ignoring the CS.
> $ echo 29 -88 0 | cs2cs EPSG:6318 EPSG:6507
> 1250642.38 -180875.29 0.00
> $ echo 29 -88 0 | cs2cs EPSG:6318 "$(cat derived.wkt)"
> 381216.56 -55130.90 0.00
>
> If I concatenate the pipeline with cct, I get the result I was expecting
> (20 feet more in the x):
> $ echo 29 -88 0 | cs2cs EPSG:6318 EPSG:6507 | cct +proj=pipeline +step
> +proj=affine +xoff=20
> 1250662.3800   -180875.2900        0.0000
>
> Is that expected? Am I doing anything wrong?
>
> Thanks.
> .___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
> Entre dos pensamientos racionales
> hay infinitos pensamientos irracionales.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20220803/a6d0a9c2/attachment.htm>


More information about the PROJ mailing list