diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-02-10 15:46:10 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-02-10 15:48:29 +0100 |
| commit | 4b44a55f6f2e60230e56f5431120dd3c3e07603f (patch) | |
| tree | d825f44742426ab69058e25133984515da612b7f /src/wkt2_grammar.y | |
| parent | a7f6b407446b35a50b5601650aed993c706fe8ee (diff) | |
| download | PROJ-4b44a55f6f2e60230e56f5431120dd3c3e07603f.tar.gz PROJ-4b44a55f6f2e60230e56f5431120dd3c3e07603f.zip | |
Allow a BoundCRS to use a PROJ string transformation
Related to https://lists.osgeo.org/pipermail/proj/2021-February/010040.html
Given test.wkt with
```
BOUNDCRS[
SOURCECRS[
GEOGCRS["unknown",
DATUM["Unknown based on GRS80 ellipsoid",
ELLIPSOID["GRS 1980",6378137,298.257222101,
LENGTHUNIT["metre",1],
ID["EPSG",7019]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8901]],
CS[ellipsoidal,2],
AXIS["longitude",east,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433,
ID["EPSG",9122]]],
AXIS["latitude",north,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433,
ID["EPSG",9122]]]]],
TARGETCRS[
GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["latitude",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["longitude",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]]],
ABRIDGEDTRANSFORMATION["Transformation from unknown to WGS84",
METHOD["PROJ-based operation method: +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=axisswap +order=2,1 +step +proj=cart +ellps=GRS80 +step +proj=helmert +convention=coordinate_frame +exact +step +inv +proj=cart +ellps=WGS84 +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=rad +xy_out=deg"]]]
```
``projinfo -s @test.wkt -t "WGS 84" -o PROJ -q``
outputs:
```
+proj=pipeline
+step +proj=unitconvert +xy_in=deg +xy_out=rad
+step +proj=axisswap +order=2,1
+step +proj=cart +ellps=GRS80
+step +proj=helmert +convention=coordinate_frame +exact
+step +inv +proj=cart +ellps=WGS84
+step +proj=axisswap +order=2,1
+step +proj=unitconvert +xy_in=rad +xy_out=deg
```
Diffstat (limited to 'src/wkt2_grammar.y')
| -rw-r--r-- | src/wkt2_grammar.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wkt2_grammar.y b/src/wkt2_grammar.y index fc2e8bf0..b17361e2 100644 --- a/src/wkt2_grammar.y +++ b/src/wkt2_grammar.y @@ -1602,12 +1602,12 @@ abridged_coordinate_transformation_next: abridged_coordinate_transformation_end: wkt_separator operation_method - wkt_separator - abridged_parameter_or_parameter_file +// At least one parameter required by WKT2. But relax that to allow things like METHOD["PROJ-based operation method: +proj=...."] +// wkt_separator abridged_parameter_or_parameter_file opt_end_abridged_coordinate_transformation right_delimiter -abridged_parameter_or_parameter_file: abridged_transformation_parameter | operation_parameter_file +//abridged_parameter_or_parameter_file: abridged_transformation_parameter | operation_parameter_file opt_end_abridged_coordinate_transformation: | wkt_separator abridged_transformation_parameter opt_end_abridged_coordinate_transformation |
