<div dir="ltr">Hi Even,<div>Indeed it's just an affine projection and I can define it with EPSG 9624 - that's currently how I'm doing it actually.</div><div>It would have been nice to define it straight with EPSG:9666 but I guess seismic bin grids are a bit of a niche and may not be worth the effort implementing.</div><div>At any rate, many thanks for your feedback,</div><div>Yannick</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 2, 2024 at 4:12 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Yannick,<br>
<br>
While PROJ can parse any valid WKT (by the way the SCALEUNIT[] inside <br>
the AXIS[] are normally not allowed for a ordinal CS, but that's not <br>
critical here), it can't necessarily always make practical use of it. In <br>
that instance, the underlying maths for `P6 I=J+90 seismic bin grid <br>
coordinate operation` (EPSG code `9666`) is not currently implemented in <br>
PROJ. Quickly looking at the formulas documented in the EPSG guidance <br>
note 7-2, it looks at first glance to boil down to just an affine <br>
transformation once you've compacted all the formulas, so you could <br>
potentially use a PROJ pipeline using the +proj=affine operator, or <br>
rewrite your WKT using the formalism of the Affine Parametric <br>
Transformation (EPSG:9624) implemented by PROJ.<br>
<br>
Even<br>
<br>
Le 02/03/2024 à 15:45, Yannick Portier via PROJ a écrit :<br>
> Hello all,<br>
><br>
> I tried asking this question on SO but failed to get an answer, so <br>
> here it is again:<br>
><br>
> I am trying to recreate the [EPSG example of georeferencing I=J+90 <br>
> local bin <br>
> grid](<a href="https://epsg.org/transformation_6918/EPSG-example-of-georeferencing-I-J-90-local-bin-grid.html" rel="noreferrer" target="_blank">https://epsg.org/transformation_6918/EPSG-example-of-georeferencing-I-J-90-local-bin-grid.html</a>) <br>
> using the `P6 I=J+90 seismic bin grid coordinate operation` (EPSG code <br>
> `9666`) but the resulting CRS can't be used to transform coordinates.<br>
> `xform = Transformer.from_crs('EPSG:25832', my_crs)` fails with <br>
> `ProjError: Input is not a transformation.`<br>
><br>
> Here is the `wkt` string I'm using to create the crs with `my_crs = <br>
> crs.CRS.from_wkt(wkt)`.<br>
><br>
>     DERIVEDPROJCRS["seismic survey bin grid",<br>
>         BASEPROJCRS["WGS 84 / UTM zone 31N",<br>
>             BASEGEOGCRS["WGS 84",<br>
>                 ENSEMBLE["World Geodetic System 1984 ensemble",<br>
>                     MEMBER["World Geodetic System 1984 (Transit)"],<br>
>                     MEMBER["World Geodetic System 1984 (G730)"],<br>
>                     MEMBER["World Geodetic System 1984 (G873)"],<br>
>                     MEMBER["World Geodetic System 1984 (G1150)"],<br>
>                     MEMBER["World Geodetic System 1984 (G1674)"],<br>
>                     MEMBER["World Geodetic System 1984 (G1762)"],<br>
>                     MEMBER["World Geodetic System 1984 (G2139)"],<br>
>                     ELLIPSOID["WGS 84",6378137,298.257223563,<br>
>                         LENGTHUNIT["metre",1]],<br>
>                     ENSEMBLEACCURACY[2.0]],<br>
>                 PRIMEM["Greenwich",0,<br>
>                     ANGLEUNIT["degree",0.0174532925199433]]],<br>
>             CONVERSION["UTM zone 31N",<br>
>                 METHOD["Transverse Mercator",<br>
>                     ID["EPSG",9807]],<br>
>                 PARAMETER["Latitude of natural origin",0,<br>
>                     ANGLEUNIT["degree",0.0174532925199433],<br>
>                     ID["EPSG",8801]],<br>
>                 PARAMETER["Longitude of natural origin",3,<br>
>                     ANGLEUNIT["degree",0.0174532925199433],<br>
>                     ID["EPSG",8802]],<br>
>                 PARAMETER["Scale factor at natural origin",0.9996,<br>
>                     SCALEUNIT["unity",1],<br>
>                     ID["EPSG",8805]],<br>
>                 PARAMETER["False easting",500000,<br>
>                     LENGTHUNIT["metre",1],<br>
>                     ID["EPSG",8806]],<br>
>                 PARAMETER["False northing",0,<br>
>                     LENGTHUNIT["metre",1],<br>
>                     ID["EPSG",8807]]]],<br>
>         DERIVINGCONVERSION["seismic survey bin grid",<br>
>             METHOD["P6 I=J+90 seismic bin grid coordinate operation",<br>
>                 ID["EPSG",9666]],<br>
>             PARAMETER["Bin grid origin I",1,<br>
>                 SCALEUNIT["Bin",1],<br>
>                 ID["EPSG",8733]],<br>
>             PARAMETER["Bin grid origin J",1,<br>
>                 SCALEUNIT["Bin",1],<br>
>                 ID["EPSG",8734]],<br>
>             PARAMETER["Bin grid origin Easting",456781,<br>
>                 LENGTHUNIT["metre",1],<br>
>                 ID["EPSG",8735]],<br>
>             PARAMETER["Bin grid origin Northing",5836723,<br>
>                 LENGTHUNIT["metre",1],<br>
>                 ID["EPSG",8736]],<br>
>             PARAMETER["Scale factor of bin grid",0.99984,<br>
>                 SCALEUNIT["Unity",1],<br>
>                 ID["EPSG",8737]],<br>
>             PARAMETER["Bin width on I-axis",25,<br>
>                 LENGTHUNIT["metre",1],<br>
>                 ID["EPSG",8738]],<br>
>             PARAMETER["Bin width on J-axis",12.5,<br>
>                 LENGTHUNIT["metre",1],<br>
>                 ID["EPSG",8739]],<br>
>             PARAMETER["Map grid bearing of bin grid J-axis",20,<br>
>                 ANGLEUNIT["degree",0.0174532925199433],<br>
>                 ID["EPSG",8740]],<br>
>             PARAMETER["Bin node increment on I-axis",1,<br>
>                 SCALEUNIT["Bin",1],<br>
>                 ID["EPSG",8741]],<br>
>             PARAMETER["Bin node increment on J-axis",1,<br>
>                 SCALEUNIT["Bin",1],<br>
>                 ID["EPSG",8742]]],<br>
>         CS[ordinal,2],<br>
>             AXIS["inline (I)",eastSouthEast,<br>
>                 ORDER[1],<br>
>                 SCALEUNIT["Bin",1]],<br>
>             AXIS["crossline (J)",northNorthEast,<br>
>                 ORDER[2],<br>
>                 SCALEUNIT["Bin",1]],<br>
>         USAGE[<br>
>             SCOPE["Navigation and medium accuracy spatial referencing."],<br>
>             AREA["Between 0°E and 6°E, northern hemisphere between <br>
> equator and 84°N, onshore and offshore. Algeria. Andorra. Belgium. <br>
> Benin. Burkina Faso. Denmark - North Sea. France. Germany - North Sea. <br>
> Ghana. Luxembourg. Mali. Netherlands. Niger. Nigeria. Norway. Spain. <br>
> Togo. United Kingdom (UK) - North Sea."],<br>
>             BBOX[0,0,84,6]]]<br>
><br>
> What's wrong ?<br>
><br>
> Many thanks,<br>
> YeO<br>
><br>
> _______________________________________________<br>
> PROJ mailing list<br>
> <a href="mailto:PROJ@lists.osgeo.org" target="_blank">PROJ@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/proj</a><br>
<br>
-- <br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
My software is free, but my time generally not.<br>
<br>
</blockquote></div>