diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-12-26 12:05:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-26 12:05:17 +0100 |
| commit | 6c0b5d9ec42d66889a5d1aa12a3f197a0b67514c (patch) | |
| tree | 3bf728a3c07afc0161b62219da572f29b06fa45a | |
| parent | d71a6ce9094daac790daf828e6148c99c30c3ed3 (diff) | |
| parent | b8f8a708c2299ba55b3d4754aa75633e3ee5897b (diff) | |
| download | PROJ-6c0b5d9ec42d66889a5d1aa12a3f197a0b67514c.tar.gz PROJ-6c0b5d9ec42d66889a5d1aa12a3f197a0b67514c.zip | |
Merge pull request #1812 from rouault/tune_canadian_ntv1_ntv2
Database: tune accuracy of Canadian NTv1 file w.r.t NTv2
| -rw-r--r-- | data/sql/customizations.sql | 11 | ||||
| -rw-r--r-- | test/cli/ntv2_out.dist | 4 | ||||
| -rw-r--r-- | test/cli/td_out.dist | 6 | ||||
| -rwxr-xr-x | test/cli/testdatumfile | 4 | ||||
| -rwxr-xr-x | test/cli/testntv2 | 8 | ||||
| -rw-r--r-- | test/cli/testprojinfo_out.dist | 12 | ||||
| -rwxr-xr-x | travis/install.sh | 3 |
7 files changed, 36 insertions, 12 deletions
diff --git a/data/sql/customizations.sql b/data/sql/customizations.sql index 8003c921..86d49b09 100644 --- a/data/sql/customizations.sql +++ b/data/sql/customizations.sql @@ -26,6 +26,17 @@ UPDATE grid_transformation SET interpolation_crs_auth_name = 'EPSG', interpolation_crs_code = '4289' WHERE auth_name = 'EPSG' AND code = '7001'; +-- EPSG:1312 'NAD27 to NAD83 (3)' / NTv1_0.gsb has a accuracy of 1m whereas +-- EPSG:1313 'NAD27 to NAD83 (4)' / NTv2_0.gsb has a accuracy of 1.5m +-- so we will never select automatically NTv2_0.gsb. Worse the advertize +-- accuracy of the NTv1 method + +UPDATE grid_transformation SET accuracy = 2.0 WHERE auth_name = 'EPSG' AND code = '1312'; + +-- Same for EPSG:1462 vs EPSG:1573 + +UPDATE grid_transformation SET accuracy = 2.0 WHERE auth_name = 'EPSG' AND code = '1462'; + -- Define the allowed authorities, and their precedence, when researching a -- coordinate operation diff --git a/test/cli/ntv2_out.dist b/test/cli/ntv2_out.dist index 940997fb..531db7be 100644 --- a/test/cli/ntv2_out.dist +++ b/test/cli/ntv2_out.dist @@ -15,3 +15,7 @@ Switching between NTv2 subgrids ############################################################## Attempt first with ntv2_0.gsb and then conus -111.5 45.26 -111.50079772 45.25992835 0.00000000 +############################################################## +NAD27 -> NAD83: 1st through ntv2, 2nd through conus +55d00'00.000"N 111d00'00.000"W 0.0 55d0'0.366"N 111d0'3.251"W 0.000 +39d00'00.000"N 111d00'00.000"W 0.0 38d59'59.912"N 111d0'2.604"W 0.000 diff --git a/test/cli/td_out.dist b/test/cli/td_out.dist index 82b64321..478a0d84 100644 --- a/test/cli/td_out.dist +++ b/test/cli/td_out.dist @@ -24,9 +24,9 @@ edge or even a wee bit outside (#141). -5.4999 51.9999 -5.498793541695 52.000009529743 0.000000000000 -5.5001 52.0 -5.500100000000 52.000000000000 0.000000000000 ############################################################## -NAD27 -> NAD83: 1st through ntv1, 2nd through conus -55d00'00.000"N 111d00'00.000"W 0.0 55d0'0.339"N 111d0'3.245"W 0.000 -39d00'00.000"N 111d00'00.000"W 0.0 38d59'59.912"N 111d0'2.604"W 0.000 +NAD27 -> NAD83: 1st through ntv1 or ntv2, 2nd through conus +55d00'00.000"N 111d00'00.000"W 0.0 55.0001 -111.0009 0.0000 +39d00'00.000"N 111d00'00.000"W 0.0 39.0000 -111.0007 0.0000 ############################################################## WGS84 -> WGS84+EGM96 2dE 49dN 0 2.00 49.00 -44.64 diff --git a/test/cli/testdatumfile b/test/cli/testdatumfile index 29a40876..e4b9ea2d 100755 --- a/test/cli/testdatumfile +++ b/test/cli/testdatumfile @@ -98,9 +98,9 @@ $EXE +proj=latlong +datum=WGS84 \ EOF # echo "##############################################################" >> ${OUT} -echo "NAD27 -> NAD83: 1st through ntv1, 2nd through conus" >> ${OUT} +echo "NAD27 -> NAD83: 1st through ntv1 or ntv2, 2nd through conus" >> ${OUT} # -$EXE NAD27 NAD83 -E >>${OUT} <<EOF +$EXE NAD27 NAD83 -E -f "%.4f" >>${OUT} <<EOF 55d00'00.000"N 111d00'00.000"W 0.0 39d00'00.000"N 111d00'00.000"W 0.0 EOF diff --git a/test/cli/testntv2 b/test/cli/testntv2 index ab72d199..72a0f9a2 100755 --- a/test/cli/testntv2 +++ b/test/cli/testntv2 @@ -65,6 +65,14 @@ echo Attempt first with ntv2_0.gsb and then conus >> ${OUT} $EXE +proj=longlat +datum=NAD27 +to +proj=longlat +datum=WGS84 -E -d 8 >>${OUT} <<EOF -111.5 45.26 EOF +# +echo "##############################################################" >> ${OUT} +echo "NAD27 -> NAD83: 1st through ntv2, 2nd through conus" >> ${OUT} +# +$EXE NAD27 NAD83 -E >>${OUT} <<EOF +55d00'00.000"N 111d00'00.000"W 0.0 +39d00'00.000"N 111d00'00.000"W 0.0 +EOF # ############################################################################## diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index 2123febc..afadbd27 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -268,12 +268,12 @@ COORDINATEOPERATION["Ballpark geographic offset from NAD27 to NAD83", Testing projinfo -s NAD27 -t NAD83 --grid-check none --spatial-test intersects --summary Candidate operations found: 10 -DERIVED_FROM(EPSG):1312, NAD27 to NAD83 (3), 1.0 m, Canada +DERIVED_FROM(EPSG):1312, NAD27 to NAD83 (3), 2.0 m, Canada DERIVED_FROM(EPSG):1313, NAD27 to NAD83 (4), 1.5 m, Canada - NAD27 DERIVED_FROM(EPSG):1241, NAD27 to NAD83 (1), 0.15 m, USA - CONUS including EEZ DERIVED_FROM(EPSG):1243, NAD27 to NAD83 (2), 0.5 m, USA - Alaska including EEZ DERIVED_FROM(EPSG):1573, NAD27 to NAD83 (6), 1.5 m, Canada - Quebec -EPSG:1462, NAD27 to NAD83 (5), 1.0 m, Canada - Quebec +EPSG:1462, NAD27 to NAD83 (5), 2.0 m, Canada - Quebec EPSG:9111, NAD27 to NAD83 (9), 1.5 m, Canada - Saskatchewan unknown id, Ballpark geographic offset from NAD27 to NAD83, unknown accuracy, World, has ballpark transformation EPSG:8555, NAD27 to NAD83 (7), 0.15 m, USA - CONUS and GoM @@ -284,7 +284,7 @@ Candidate operations found: 10 ------------------------------------- Operation n°1: -DERIVED_FROM(EPSG):1312, NAD27 to NAD83 (3), 1.0 m, Canada +DERIVED_FROM(EPSG):1312, NAD27 to NAD83 (3), 2.0 m, Canada PROJ string: +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=ntv1_can.dat +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 @@ -324,7 +324,7 @@ COORDINATEOPERATION["NAD27 to NAD83 (3)", METHOD["NTv1", ID["EPSG",9614]], PARAMETERFILE["Latitude and longitude difference file","ntv1_can.dat"], - OPERATIONACCURACY[1.0], + OPERATIONACCURACY[2.0], USAGE[ SCOPE["Historic record only - now superseded - see remarks."], AREA["Canada"], @@ -532,7 +532,7 @@ COORDINATEOPERATION["NAD27 to NAD83 (6)", ------------------------------------- Operation n°6: -EPSG:1462, NAD27 to NAD83 (5), 1.0 m, Canada - Quebec +EPSG:1462, NAD27 to NAD83 (5), 2.0 m, Canada - Quebec PROJ string: +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=GS2783v1.QUE +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 @@ -573,7 +573,7 @@ COORDINATEOPERATION["NAD27 to NAD83 (5)", METHOD["NTv1", ID["EPSG",9614]], PARAMETERFILE["Latitude and longitude difference file","GS2783v1.QUE"], - OPERATIONACCURACY[1.0], + OPERATIONACCURACY[2.0], USAGE[ SCOPE["Historic record only - now superseded - see remarks."], AREA["Canada - Quebec"], diff --git a/travis/install.sh b/travis/install.sh index c41dc014..e4781d52 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -15,6 +15,7 @@ echo "NPROC=${NPROC}" # Download grid files wget https://download.osgeo.org/proj/proj-datumgrid-1.8.zip +wget "https://github.com/OSGeo/proj-datumgrid/blob/master/north-america/ntv2_0.gsb?raw=true" -O ntv2_0.gsb # prepare build files ./autogen.sh @@ -95,7 +96,7 @@ cd .. cd ../.. # Install grid files -(cd data && unzip -o ../proj-datumgrid-1.8.zip) +(cd data && unzip -o ../proj-datumgrid-1.8.zip && cp ../ntv2_0.gsb . ) # autoconf build with grids mkdir build_autoconf_grids |
