diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-11-16 13:57:09 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-11-16 14:34:33 +0100 |
| commit | 63f9f4e09ab26f1a52751cec15f394e88660b8bf (patch) | |
| tree | df6541743ae031304b3ea7419db0b2a33d9b1bf6 /test/unit/test_io.cpp | |
| parent | 1a98229ed2c738bd563122084a08d36b2bf0ebaf (diff) | |
| download | PROJ-63f9f4e09ab26f1a52751cec15f394e88660b8bf.tar.gz PROJ-63f9f4e09ab26f1a52751cec15f394e88660b8bf.zip | |
WKT2 parsing: several fixes related to map projection parameter units
- WKT2 grammar: accept PARAMETER[name,value,id] without unit
- Recognize "Ellipsoid scaling factor" as a parameter with a scaling unit,
and defaults to Unity when not specified
- WKT2 parsing: implement the requirement of 18-010r7.html#80, that is
when a map projection parameter has no explicit unit, use metre/degree/unity
as the default unit (contrary to WKT1 parsing rules where they are deduced
from the GeogCRS angular unit and coordinate system)
Diffstat (limited to 'test/unit/test_io.cpp')
| -rw-r--r-- | test/unit/test_io.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index 3d8df998..dff8ec45 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -1658,16 +1658,21 @@ TEST(wkt_parse, wkt2_projected) { " ID[\"EPSG\",9122]],\n" " ID[\"EPSG\",8801]],\n" " PARAMETER[\"Longitude of natural origin\",3,\n" - " ANGLEUNIT[\"degree\",0.0174532925199433,\n" - " ID[\"EPSG\",9122]],\n" + // Volontary omit LENGTHUNIT to check the WKT grammar accepts + // Check that we default to degree + //" ANGLEUNIT[\"degree\",0.0174532925199433,\n" + //" ID[\"EPSG\",9122]],\n" " ID[\"EPSG\",8802]],\n" " PARAMETER[\"Scale factor at natural origin\",0.9996,\n" - " SCALEUNIT[\"unity\",1,\n" - " ID[\"EPSG\",9201]],\n" + // Check that we default to unity + //" SCALEUNIT[\"unity\",1,\n" + //" ID[\"EPSG\",9201]],\n" " ID[\"EPSG\",8805]],\n" " PARAMETER[\"False easting\",500000,\n" - " LENGTHUNIT[\"metre\",1,\n" - " ID[\"EPSG\",9001]],\n" + // Volontary omit LENGTHUNIT to check the WKT grammar accepts + // Check that we default to metre + //" LENGTHUNIT[\"metre\",1,\n" + //" ID[\"EPSG\",9001]],\n" " ID[\"EPSG\",8806]],\n" " PARAMETER[\"False northing\",0,\n" " LENGTHUNIT[\"metre\",1,\n" |
