Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4aa56f2d0e | ||
|
|
ff63939f9b | ||
|
|
aea3d29de8 | ||
|
|
07754f7cae | ||
|
|
a035a83d03 | ||
|
|
a7a4d35816 | ||
|
|
71f6e3a21f | ||
|
|
ae168e009b | ||
|
|
30d6ec80fd | ||
|
|
3d75435aa9 | ||
|
|
cedc9789a1 | ||
|
|
e4d0c40f82 | ||
|
|
e03a9aacec | ||
|
|
a42b447021 | ||
|
|
0d96f25f2e | ||
|
|
79a93bcb21 | ||
|
|
4669819b87 | ||
|
|
f8423cb908 | ||
|
|
76973c9e56 | ||
|
|
734b698043 | ||
|
|
31ca31f3a7 | ||
|
|
45bea392cb | ||
|
|
5ca8e3cf6e | ||
|
|
c19c6606a2 | ||
|
|
3c202610d3 | ||
|
|
4f5df6999e | ||
|
|
f1635cec8d | ||
|
|
8cb60c89d8 | ||
|
|
c44e53dec5 | ||
|
|
62038f4a38 | ||
|
|
56449166e5 | ||
|
|
6355e5533b | ||
|
|
b73903790a | ||
|
|
89deef0171 | ||
|
|
752cb2a162 | ||
|
|
08c522c210 | ||
|
|
38e507c341 | ||
|
|
c5f2cc2c8c | ||
|
|
03b5f40edf | ||
|
|
9a7ee56058 | ||
|
|
eeb9fef28a | ||
|
|
6804e7dfc7 | ||
|
|
8e9239cfe4 | ||
|
|
0ef80def8c | ||
|
|
afc0af3afd | ||
|
|
b14fba9857 | ||
|
|
4e5f622590 | ||
|
|
7f0d6a0839 | ||
|
|
e77545c092 | ||
|
|
9263a33ef7 | ||
|
|
fda68193f0 | ||
|
|
9393831dce | ||
|
|
6293c434c6 | ||
|
|
f4bd832184 | ||
|
|
861ae257f4 | ||
|
|
b595edeaf0 | ||
|
|
0d90ce1834 | ||
|
|
acca996513 | ||
|
|
ce97e244e3 | ||
|
|
22f5eb4724 | ||
|
|
2299fa9e16 | ||
|
|
6651e97dae | ||
|
|
4075266be0 | ||
|
|
6f1a3c4648 | ||
|
|
339b71fa32 | ||
|
|
da406335b3 | ||
|
|
d7d5e48de5 | ||
|
|
d5e07c5399 | ||
|
|
5cf4ca197c | ||
|
|
ba9e15cc22 |
@@ -48,6 +48,8 @@ jobs:
|
||||
run: |
|
||||
python3 --version
|
||||
sphinx-build --version
|
||||
python3 -m pip list --not-required --format=columns
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
name: Images
|
||||
with:
|
||||
|
||||
@@ -96,7 +96,6 @@ install_manifest.txt
|
||||
/data/for_tests/
|
||||
|
||||
# docs
|
||||
tmp_breathe
|
||||
/docs/.doxygen_up_to_date
|
||||
/docs/build
|
||||
/latex
|
||||
|
||||
+2
-2
@@ -110,9 +110,9 @@ message(STATUS "Configuring PROJ:")
|
||||
#PROJ version information
|
||||
################################################################################
|
||||
include(ProjVersion)
|
||||
proj_version(MAJOR 8 MINOR 0 PATCH 0)
|
||||
proj_version(MAJOR 8 MINOR 0 PATCH 1)
|
||||
set(PROJ_API_VERSION "22")
|
||||
set(PROJ_BUILD_VERSION "22.0.0")
|
||||
set(PROJ_BUILD_VERSION "22.1.0")
|
||||
|
||||
################################################################################
|
||||
# Build features and variants
|
||||
|
||||
@@ -1033,13 +1033,6 @@ VERBATIM_HEADERS = YES
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
|
||||
# which the alphabetical index list will be split.
|
||||
# Minimum value: 1, maximum value: 20, default value: 5.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all classes will
|
||||
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
|
||||
# can be used to specify a prefix (or a list of prefixes) that should be ignored
|
||||
|
||||
@@ -1,3 +1,72 @@
|
||||
8.0.1 Release Notes
|
||||
-------------------
|
||||
|
||||
Updates
|
||||
-------
|
||||
|
||||
o Database: update to EPSG v10.018 (#2636)
|
||||
|
||||
o Add transformations for CHGeo2004, Swiss geoid model (#2604)
|
||||
|
||||
o Additions to the norwegian NKG2020 transformation (#2600)
|
||||
|
||||
Bug fixes
|
||||
---------
|
||||
|
||||
o pj_vlog(): fix buffer overflow in case of super lengthy error message (#2693)
|
||||
|
||||
o Revert "proj_create_crs_to_crs_from_pj(): do not use PROJ_SPATIAL_CRITERION_PARTIAL_INTERSECTION if area is specified" (#2679)
|
||||
|
||||
o UTM: error out when value of +zone= is not an integer (#2672)
|
||||
|
||||
o getCRSInfoList(): make result order deterministic (by increasing auth_name,
|
||||
code) (#2661)
|
||||
|
||||
o createOperation(): make sure no to discard deprecated operations if the
|
||||
replacement uses an unknow grid (#2623)
|
||||
|
||||
o Fix build on Solaris 11.4 (#2621)
|
||||
|
||||
o Add mapping of ESRI Equal_Area projection method to EPSG (#2612)
|
||||
|
||||
o Fix incorrect EPGS extent code for EPSG:7789>EPSG:4976 NKG transformation (#2599)
|
||||
|
||||
o fix wrong capitalization of CHENyx06_ETRS.gsb (#2597)
|
||||
|
||||
o createOperations(): improve handling of vertical transforms when
|
||||
when compound CRSs are used (#2592)
|
||||
|
||||
o CRS::promoteTo3D(): propagate the extent from the 2D CRS (#2589)
|
||||
|
||||
o createFromCRSCodesWithIntermediates(): improve performance when there is
|
||||
no match (#2583)
|
||||
|
||||
o Fix proj_clone() to work on 'meta' coordinate operation PJ* objects that
|
||||
can be returned by proj_create_crs_to_crs() (#2582)
|
||||
|
||||
o add PROJ_COMPUTE_VERSION, PROJ_VERSION_NUMBER,
|
||||
PROJ_AT_LEAST_VERSION macros (#2581)
|
||||
|
||||
o Make proj_lp_dist() and proj_geod() work on a PJ* CRS object (#2570)
|
||||
|
||||
o Fix gcc 11 -Wnonnull compilation warnings (#2559)
|
||||
|
||||
o Fix use of uninitialized memory in gie tests (#2558)
|
||||
|
||||
o createOperations(): fix incorrect height transformation between 3D promoted RGF93 and CH1903+ (#2555)
|
||||
|
||||
|
||||
THANKS TO
|
||||
---------
|
||||
|
||||
Dan Jacobson
|
||||
Sveinung Himle
|
||||
Mike Taves
|
||||
Javier Jimenez Shaw
|
||||
Kristian Evers
|
||||
Even Rouault
|
||||
|
||||
|
||||
8.0.0 Release Notes
|
||||
-------------------
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT([PROJ], [8.0.0],
|
||||
AC_INIT([PROJ], [8.0.1],
|
||||
[https://github.com/OSGeo/PROJ/issues], proj, [https://proj.org])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_LANG(C)
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
#
|
||||
<metadata> +origin=Swisstopo +lastupdate=2012-02-27
|
||||
# CH1903/LV03
|
||||
<1903_LV03> +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +units=m +nadgrids=CHENYX06_etrs.gsb +no_defs
|
||||
<1903_LV03> +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +units=m +nadgrids=CHENyx06_ETRS.gsb +no_defs
|
||||
# CH1903
|
||||
<1903> +proj=longlat +ellps=bessel +nadgrids=CHENYX06_etrs.gsb +no_defs <>
|
||||
<1903> +proj=longlat +ellps=bessel +nadgrids=CHENyx06_ETRS.gsb +no_defs <>
|
||||
|
||||
+2
-1
@@ -39,10 +39,11 @@ SQL_ORDERED_LIST = sql/begin.sql \
|
||||
sql/deprecation.sql \
|
||||
sql/esri.sql \
|
||||
sql/ignf.sql \
|
||||
sql/nkg.sql \
|
||||
sql/grid_alternatives.sql \
|
||||
sql/grid_alternatives_generated_noaa.sql \
|
||||
sql/customizations.sql \
|
||||
sql/nkg.sql \
|
||||
sql/nkg_post_customizations.sql \
|
||||
sql/commit.sql
|
||||
|
||||
EXTRA_DIST = proj.ini GL27 nad.lst nad27 nad83 \
|
||||
|
||||
+26
-5
@@ -620,6 +620,10 @@ INSERT INTO "alias_name" VALUES('vertical_datum','EPSG','1303','NVD 1992','EPSG'
|
||||
INSERT INTO "alias_name" VALUES('vertical_datum','EPSG','1301','CD Norway','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('vertical_datum','EPSG','1199','Greenland Vertical Reference 2000','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','1304','REDGEOMIN','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('vertical_datum','EPSG','1297','EVRF2007-PL','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','1305','ETRF2000-PL','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','6277','OSGB36','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','6277','OSGB 1936','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','21100','Genuk / NEIEZ','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2140','NAD83(CSRS98) / SCoPQ zone 3','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2141','NAD83(CSRS98) / SCoPQ zone 4','EPSG');
|
||||
@@ -2131,11 +2135,11 @@ INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2172','System 1965 zone
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2173','System 1965 zone III','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2174','System 1965 zone IV','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2175','System 1965 zone V','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2176','System 2000/15','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2177','System 2000/18','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2178','System 2000/21','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2179','System 2000/24','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2180','System 1992','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2176','PL-2000/15','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2177','PL-2000/18','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2178','PL-2000/21','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2179','PL-2000/24','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2180','PL-1992','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','3120','System 1965 zone I','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','3346','LKS94','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','3346','LT_LKS94 / LT_TM','EPSG');
|
||||
@@ -7228,6 +7232,18 @@ INSERT INTO "alias_name" VALUES('projected_crs','EPSG','9680','WGS 84 / BUTM 201
|
||||
INSERT INTO "alias_name" VALUES('compound_crs','EPSG','6893','WGS 84 / World Mercator + EGM2008 height','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('compound_crs','EPSG','7955','St. Helena Tritan / UTM zone 30S + Tritan 2011 height','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('compound_crs','EPSG','7956','SHMG2015 + SHVD2015 height','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2176','ETRS89 / Poland CS2000 zone 5','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2177','ETRS89 / Poland CS2000 zone 6','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2178','ETRS89 / Poland CS2000 zone 7','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2179','ETRS89 / Poland CS2000 zone 8','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','2180','ETRS89 / Poland CS92','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('vertical_crs','EPSG','9650','PL_KRON / NH','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('vertical_crs','EPSG','9650','Kronzstad 86','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('vertical_crs','EPSG','9650','Kronstadt 1986 height','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('vertical_crs','EPSG','9651','PL_AMST / NH','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('vertical_crs','EPSG','9651','PL-EVRF2007-NH','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_crs','EPSG','9700','PL-ETRF2000','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_crs','EPSG','9701','PL-ETRF2000','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_crs','EPSG','8401','748','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_crs','EPSG','8401','ETRF2014 - XYZ','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_crs','EPSG','8403','747','EPSG');
|
||||
@@ -7235,3 +7251,8 @@ INSERT INTO "alias_name" VALUES('geodetic_crs','EPSG','8403','ETRF2014 - LatLonE
|
||||
INSERT INTO "alias_name" VALUES('geodetic_crs','EPSG','9069','746','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_crs','EPSG','9069','ETRF2014- LatLon','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('vertical_crs','EPSG','9672','CD Norway','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('compound_crs','EPSG','9656','PL-ETRF2000 + Kronzstad 86','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('compound_crs','EPSG','9657','PL-ETRF2000 + Kronzstad 86','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_crs','EPSG','4277','OSGB 1936','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('projected_crs','EPSG','27700','OSGB 1936 / British National Grid','EPSG');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_crs','EPSG','9702','PL-ETRF2000','EPSG');
|
||||
|
||||
+8
-8
@@ -172,10 +172,6 @@ INSERT INTO "axis" VALUES('EPSG','63','Geodetic latitude','Lat','north','EPSG','
|
||||
INSERT INTO "axis" VALUES('EPSG','64','Geodetic longitude','Long','east','EPSG','6405',2,'EPSG','9102');
|
||||
INSERT INTO "axis" VALUES('EPSG','65','Geodetic latitude','Lat','north','EPSG','6406',1,'EPSG','9116');
|
||||
INSERT INTO "axis" VALUES('EPSG','66','Geodetic longitude','Long','east','EPSG','6406',2,'EPSG','9116');
|
||||
INSERT INTO "axis" VALUES('EPSG','69','Geodetic latitude','Lat','north','EPSG','6408',1,'EPSG','9115');
|
||||
INSERT INTO "axis" VALUES('EPSG','70','Geodetic longitude','Long','east','EPSG','6408',2,'EPSG','9115');
|
||||
INSERT INTO "axis" VALUES('EPSG','71','Geodetic latitude','Lat','north','EPSG','6409',1,'EPSG','9118');
|
||||
INSERT INTO "axis" VALUES('EPSG','72','Geodetic longitude','Long','east','EPSG','6409',2,'EPSG','9118');
|
||||
INSERT INTO "axis" VALUES('EPSG','106','Geodetic latitude','Lat','north','EPSG','6422',1,'EPSG','9122');
|
||||
INSERT INTO "axis" VALUES('EPSG','107','Geodetic longitude','Lon','east','EPSG','6422',2,'EPSG','9122');
|
||||
INSERT INTO "axis" VALUES('EPSG','115','Geocentric X','X','geocentricX','EPSG','6500',1,'EPSG','9001');
|
||||
@@ -204,10 +200,10 @@ INSERT INTO "axis" VALUES('EPSG','174','Plant North','y','northwest','EPSG','651
|
||||
INSERT INTO "axis" VALUES('EPSG','211','Plant East','x','east','EPSG','6512',1,'EPSG','9001');
|
||||
INSERT INTO "axis" VALUES('EPSG','212','Plant North','y','north','EPSG','6512',2,'EPSG','9001');
|
||||
INSERT INTO "axis" VALUES('EPSG','213','Local height','z','up','EPSG','6512',3,'EPSG','9001');
|
||||
INSERT INTO "axis" VALUES('EPSG','32763','Bin grid I','I','J-axis plus 90 degrees','EPSG','32760',1,NULL,NULL);
|
||||
INSERT INTO "axis" VALUES('EPSG','32764','Bin grid J','J','See associated operation','EPSG','32760',2,NULL,NULL);
|
||||
INSERT INTO "axis" VALUES('EPSG','32765','Bin grid I','I','J-axis minus 90 degrees','EPSG','32761',1,NULL,NULL);
|
||||
INSERT INTO "axis" VALUES('EPSG','32766','Bin grid J','J','See associated operation','EPSG','32761',2,NULL,NULL);
|
||||
INSERT INTO "axis" VALUES('EPSG','32845','Bin grid I','I','J-axis plus 90 degrees','EPSG','32760',1,NULL,NULL);
|
||||
INSERT INTO "axis" VALUES('EPSG','32846','Bin grid J','J','See associated operation','EPSG','32760',2,NULL,NULL);
|
||||
INSERT INTO "axis" VALUES('EPSG','32847','Bin grid I','I','J-axis minus 90 degrees','EPSG','32761',1,NULL,NULL);
|
||||
INSERT INTO "axis" VALUES('EPSG','32848','Bin grid J','J','See associated operation','EPSG','32761',2,NULL,NULL);
|
||||
INSERT INTO "axis" VALUES('EPSG','1082','Gravity-related height','H','up','EPSG','1030',1,'EPSG','9002');
|
||||
INSERT INTO "axis" VALUES('EPSG','1516','Depth','D','down','EPSG','1043',1,'EPSG','9003');
|
||||
INSERT INTO "axis" VALUES('EPSG','1051','Local depth','d','down','EPSG','1049',1,'EPSG','9001');
|
||||
@@ -224,6 +220,10 @@ INSERT INTO "axis" VALUES('EPSG','61','Spherical longitude','Long','east','EPSG'
|
||||
INSERT INTO "axis" VALUES('EPSG','62','Geocentric radius','R','up','EPSG','6404',3,'EPSG','9001');
|
||||
INSERT INTO "axis" VALUES('EPSG','67','Geodetic latitude','Lat','north','EPSG','6407',1,'EPSG','9117');
|
||||
INSERT INTO "axis" VALUES('EPSG','68','Geodetic longitude','Long','east','EPSG','6407',2,'EPSG','9117');
|
||||
INSERT INTO "axis" VALUES('EPSG','69','Geodetic latitude','Lat','north','EPSG','6408',1,'EPSG','9115');
|
||||
INSERT INTO "axis" VALUES('EPSG','70','Geodetic longitude','Long','east','EPSG','6408',2,'EPSG','9115');
|
||||
INSERT INTO "axis" VALUES('EPSG','71','Geodetic latitude','Lat','north','EPSG','6409',1,'EPSG','9118');
|
||||
INSERT INTO "axis" VALUES('EPSG','72','Geodetic longitude','Long','east','EPSG','6409',2,'EPSG','9118');
|
||||
INSERT INTO "axis" VALUES('EPSG','73','Geodetic latitude','Lat','north','EPSG','6410',1,'EPSG','9119');
|
||||
INSERT INTO "axis" VALUES('EPSG','74','Geodetic longitude','Long','east','EPSG','6410',2,'EPSG','9119');
|
||||
INSERT INTO "axis" VALUES('EPSG','75','Geodetic latitude','Lat','north','EPSG','6411',1,'EPSG','9107');
|
||||
|
||||
+17
-5
@@ -118,21 +118,32 @@ FOR EACH ROW BEGIN
|
||||
g.method_name LIKE 'Geographic3D to GravityRelatedHeight%' AND
|
||||
g.target_crs_auth_name || g.target_crs_code NOT IN
|
||||
(SELECT auth_name || code FROM vertical_crs));
|
||||
SELECT RAISE(ABORT, 'One grid_transformation with Geographic3D to GravityRelatedHeight has not its source_crs in geodetic_crs table with type = ''geographic 3D''')
|
||||
SELECT RAISE(ABORT, 'One grid_transformation with Geographic3D to GravityRelatedHeight or Geog3D to Geog2D+XXX has not its source_crs in geodetic_crs table with type = ''geographic 3D''')
|
||||
WHERE EXISTS (SELECT * FROM grid_transformation g WHERE
|
||||
g.deprecated = 0 AND
|
||||
g.method_name LIKE 'Geographic3D to GravityRelatedHeight%' AND
|
||||
NOT (g.auth_name = 'EPSG' AND g.code IN (7648, 7649, 7650)) AND -- those are wrongly registered as they use a geocentric CRS. Reported to EPSG
|
||||
(g.method_name LIKE 'Geographic3D to %' OR g.method_name LIKE 'Geog3D to %') AND
|
||||
g.source_crs_auth_name || g.source_crs_code NOT IN
|
||||
(SELECT auth_name || code FROM geodetic_crs
|
||||
WHERE type = 'geographic 3D'));
|
||||
|
||||
-- check that grids with 'Vertical Offset by Grid Interpolation' methods are properly registered
|
||||
SELECT RAISE(ABORT, 'One grid_transformation with Vertical Offset by Grid Interpolation has not its source_crs in vertical_crs table')
|
||||
WHERE EXISTS (SELECT * FROM grid_transformation g WHERE
|
||||
g.method_name LIKE 'Vertical Offset by Grid Interpolation%' AND
|
||||
g.source_crs_auth_name || g.source_crs_code NOT IN
|
||||
(SELECT auth_name || code FROM vertical_crs));
|
||||
SELECT RAISE(ABORT, 'One grid_transformation with Vertical Offset by Grid Interpolation has not its target_crs in vertical_crs table')
|
||||
WHERE EXISTS (SELECT * FROM grid_transformation g WHERE
|
||||
g.method_name LIKE 'Vertical Offset by Grid Interpolation%' AND
|
||||
g.target_crs_auth_name || g.target_crs_code NOT IN
|
||||
(SELECT auth_name || code FROM vertical_crs));
|
||||
|
||||
-- check that transformations intersect the area of use of their source/target CRS
|
||||
-- EPSG, ESRI and IGNF have cases where this does not hold.
|
||||
SELECT RAISE(ABORT, 'The area of use of at least one coordinate_operation does not intersect the one of its source CRS')
|
||||
WHERE EXISTS (SELECT * FROM coordinate_operation_view v, crs_view c, usage vu, extent ve, usage cu, extent ce WHERE
|
||||
v.deprecated = 0 AND
|
||||
v.auth_name NOT IN ('EPSG', 'ESRI', 'IGNF') AND
|
||||
(v.table_name = 'grid_transformation' OR v.auth_name NOT IN ('EPSG', 'ESRI', 'IGNF')) AND
|
||||
v.source_crs_auth_name = c.auth_name AND
|
||||
v.source_crs_code = c.code AND
|
||||
vu.object_table_name = v.table_name AND
|
||||
@@ -149,7 +160,8 @@ FOR EACH ROW BEGIN
|
||||
SELECT RAISE(ABORT, 'The area of use of at least one coordinate_operation does not intersect the one of its target CRS')
|
||||
WHERE EXISTS (SELECT * FROM coordinate_operation_view v, crs_view c, usage vu, extent ve, usage cu, extent ce WHERE
|
||||
v.deprecated = 0 AND
|
||||
v.auth_name NOT IN ('EPSG', 'ESRI', 'IGNF') AND
|
||||
((v.table_name = 'grid_transformation' AND NOT (v.auth_name = 'IGNF' AND v.code = 'TSG1185'))
|
||||
OR v.auth_name NOT IN ('EPSG', 'ESRI', 'IGNF')) AND
|
||||
v.target_crs_auth_name = c.auth_name AND
|
||||
v.target_crs_code = c.code AND
|
||||
vu.object_table_name = v.table_name AND
|
||||
|
||||
@@ -268,7 +268,7 @@ INSERT INTO "compound_crs" VALUES('EPSG','7403','NTF (Paris) / France III + NGF
|
||||
INSERT INTO "usage" VALUES('EPSG','5268','compound_crs','EPSG','7403','EPSG','1733','EPSG','1142');
|
||||
INSERT INTO "compound_crs" VALUES('EPSG','7404','RT90 + RH70 height',NULL,'EPSG','4124','EPSG','5718',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','5269','compound_crs','EPSG','7404','EPSG','3313','EPSG','1142');
|
||||
INSERT INTO "compound_crs" VALUES('EPSG','7405','OSGB 1936 / British National Grid + ODN height',NULL,'EPSG','27700','EPSG','5701',0);
|
||||
INSERT INTO "compound_crs" VALUES('EPSG','7405','OSGB36 / British National Grid + ODN height',NULL,'EPSG','27700','EPSG','5701',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','5270','compound_crs','EPSG','7405','EPSG','2792','EPSG','1142');
|
||||
INSERT INTO "compound_crs" VALUES('EPSG','7406','NAD27 + NGVD29 height (ftUS)',NULL,'EPSG','4267','EPSG','5702',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','5271','compound_crs','EPSG','7406','EPSG','1323','EPSG','1142');
|
||||
@@ -690,6 +690,10 @@ INSERT INTO "compound_crs" VALUES('EPSG','9543','ITRF2005 + SA LLD height',NULL,
|
||||
INSERT INTO "usage" VALUES('EPSG','14522','compound_crs','EPSG','9543','EPSG','3309','EPSG','1026');
|
||||
INSERT INTO "compound_crs" VALUES('EPSG','9544','NAD83(CSRS)v6 + CGVD2013(CGG2013a) height',NULL,'EPSG','8252','EPSG','9245',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','14525','compound_crs','EPSG','9544','EPSG','1061','EPSG','1026');
|
||||
INSERT INTO "compound_crs" VALUES('EPSG','9656','ETRF2000-PL + Baltic 1986 height',NULL,'EPSG','9702','EPSG','9650',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15108','compound_crs','EPSG','9656','EPSG','3293','EPSG','1270');
|
||||
INSERT INTO "compound_crs" VALUES('EPSG','9657','ETRF2000-PL + EVRF2007-PL height',NULL,'EPSG','9702','EPSG','9651',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15109','compound_crs','EPSG','9657','EPSG','3293','EPSG','1270');
|
||||
INSERT INTO "compound_crs" VALUES('EPSG','9705','WGS 84 + MSL height',NULL,'EPSG','4326','EPSG','5714',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15089','compound_crs','EPSG','9705','EPSG','1262','EPSG','1026');
|
||||
INSERT INTO "compound_crs" VALUES('EPSG','9707','WGS 84 + EGM96 height',NULL,'EPSG','4326','EPSG','5773',0);
|
||||
|
||||
@@ -268,7 +268,6 @@ INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','6223','carthage','PROJ'
|
||||
INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','6312','hermannskogel','PROJ');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','6299','ire65','PROJ');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','6272','nzgd49','PROJ');
|
||||
INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','6277','OSGB36','PROJ');
|
||||
|
||||
-- Given that we have installed above a WGS84 alias to the datum, add also one
|
||||
-- to the EPSG:4326 CRS, as this is a common use case (https://github.com/OSGeo/PROJ/issues/2216)
|
||||
@@ -341,7 +340,9 @@ FROM grid_transformation gt
|
||||
JOIN compound_crs c ON gt.target_crs_code = c.code AND gt.target_crs_auth_name = c.auth_name
|
||||
JOIN geodetic_crs gcrs ON gt.source_crs_auth_name = gcrs.auth_name AND gt.source_crs_code = gcrs.code
|
||||
JOIN vertical_crs vcrs on vcrs.auth_name = c.vertical_crs_auth_name AND vcrs.code = c.vertical_crs_code
|
||||
WHERE method_auth_name = 'EPSG' AND method_code IN ('1088', '1089', '1090', '1091', '1092', '1093', '1094', '1095', '1096', '1097', '1098', '1103') AND gt.deprecated = 0;
|
||||
WHERE method_auth_name = 'EPSG' AND method_name LIKE 'Geog3D to Geog2D+%'
|
||||
AND NOT EXISTS (SELECT 1 FROM grid_transformation gt2 WHERE gt2.method_name LIKE 'Geographic3D to%' AND gt2.source_crs_auth_name = gt.source_crs_auth_name AND gt2.source_crs_code = gt.source_crs_code AND gt2.target_crs_auth_name = vcrs.auth_name AND gt2.target_crs_code = vcrs.code)
|
||||
AND gt.deprecated = 0;
|
||||
|
||||
INSERT INTO "usage"
|
||||
SELECT
|
||||
@@ -356,4 +357,5 @@ SELECT
|
||||
u.scope_code
|
||||
FROM grid_transformation gt
|
||||
JOIN usage u ON u.object_auth_name = gt.auth_name AND u.object_code = gt.code AND u.object_table_name = 'grid_transformation'
|
||||
WHERE method_auth_name = 'EPSG' AND method_code IN ('1088', '1089', '1090', '1091', '1092', '1093', '1094', '1095', '1096', '1097', '1098', '1103') AND gt.deprecated = 0;
|
||||
WHERE method_auth_name = 'EPSG' AND method_name LIKE 'Geog3D to Geog2D+%'
|
||||
AND EXISTS (SELECT 1 FROM grid_transformation gt2 WHERE gt2.auth_name = 'PROJ' AND gt2.code = gt.auth_name || '_' || gt.code || '_RESTRICTED_TO_VERTCRS');
|
||||
|
||||
+18
-6
@@ -8131,11 +8131,17 @@ INSERT INTO "projected_crs" VALUES('ESRI','53032','Sphere_Azimuthal_Equidistant'
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_53032_USAGE','projected_crs','ESRI','53032','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','53034','Sphere_Cylindrical_Equal_Area',NULL,NULL,NULL,'EPSG','4035',NULL,NULL,'PROJCS["Sphere_Cylindrical_Equal_Area",GEOGCS["GCS_Sphere",DATUM["D_Sphere",SPHEROID["Sphere",6371000.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',0);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_53034_USAGE','projected_crs','ESRI','53034','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','53035','Sphere_Equal_Earth_Greenwich',NULL,NULL,NULL,'ESRI','104047',NULL,NULL,'PROJCS["Sphere_Equal_Earth_Greenwich",GEOGCS["GCS_Sphere_GRS_1980_Mean_Radius",DATUM["D_Sphere_GRS_1980_Mean_Radius",SPHEROID["Sphere_GRS_1980_Mean_Radius",6371008.7714,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equal_Earth"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],UNIT["Meter",1.0]]',0);
|
||||
INSERT INTO "conversion" VALUES('ESRI','53035','unnamed',NULL,'EPSG','1078','Equal Earth','EPSG','8802','Longitude of natural origin',0.0,'EPSG','9102','EPSG','8806','False easting',0.0,'EPSG','9001','EPSG','8807','False northing',0.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'CONV_53035_USAGE','conversion','ESRI','53035','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','53035','Sphere_Equal_Earth_Greenwich',NULL,'EPSG','4400','ESRI','104047','ESRI','53035',NULL,0);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_53035_USAGE','projected_crs','ESRI','53035','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','53036','Sphere_Equal_Earth_Americas',NULL,NULL,NULL,'ESRI','104047',NULL,NULL,'PROJCS["Sphere_Equal_Earth_Americas",GEOGCS["GCS_Sphere_GRS_1980_Mean_Radius",DATUM["D_Sphere_GRS_1980_Mean_Radius",SPHEROID["Sphere_GRS_1980_Mean_Radius",6371008.7714,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equal_Earth"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-90.0],UNIT["Meter",1.0]]',0);
|
||||
INSERT INTO "conversion" VALUES('ESRI','53036','unnamed',NULL,'EPSG','1078','Equal Earth','EPSG','8802','Longitude of natural origin',-90.0,'EPSG','9102','EPSG','8806','False easting',0.0,'EPSG','9001','EPSG','8807','False northing',0.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'CONV_53036_USAGE','conversion','ESRI','53036','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','53036','Sphere_Equal_Earth_Americas',NULL,'EPSG','4400','ESRI','104047','ESRI','53036',NULL,0);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_53036_USAGE','projected_crs','ESRI','53036','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','53037','Sphere_Equal_Earth_Asia_Pacific',NULL,NULL,NULL,'ESRI','104047',NULL,NULL,'PROJCS["Sphere_Equal_Earth_Asia_Pacific",GEOGCS["GCS_Sphere_GRS_1980_Mean_Radius",DATUM["D_Sphere_GRS_1980_Mean_Radius",SPHEROID["Sphere_GRS_1980_Mean_Radius",6371008.7714,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equal_Earth"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",150.0],UNIT["Meter",1.0]]',0);
|
||||
INSERT INTO "conversion" VALUES('ESRI','53037','unnamed',NULL,'EPSG','1078','Equal Earth','EPSG','8802','Longitude of natural origin',150.0,'EPSG','9102','EPSG','8806','False easting',0.0,'EPSG','9001','EPSG','8807','False northing',0.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'CONV_53037_USAGE','conversion','ESRI','53037','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','53037','Sphere_Equal_Earth_Asia_Pacific',NULL,'EPSG','4400','ESRI','104047','ESRI','53037',NULL,0);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_53037_USAGE','projected_crs','ESRI','53037','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','53042','Sphere_Winkel_Tripel_NGS',NULL,NULL,NULL,'EPSG','4035',NULL,NULL,'PROJCS["Sphere_Winkel_Tripel_NGS",GEOGCS["GCS_Sphere",DATUM["D_Sphere",SPHEROID["Sphere",6371000.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Winkel_Tripel"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",50.467],UNIT["Meter",1.0]]',0);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_53042_USAGE','projected_crs','ESRI','53042','EPSG','1262','EPSG','1024');
|
||||
@@ -8223,11 +8229,17 @@ INSERT INTO "projected_crs" VALUES('ESRI','54032','World_Azimuthal_Equidistant',
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_54032_USAGE','projected_crs','ESRI','54032','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','54034','World_Cylindrical_Equal_Area',NULL,NULL,NULL,'EPSG','4326',NULL,NULL,'PROJCS["World_Cylindrical_Equal_Area",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',0);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_54034_USAGE','projected_crs','ESRI','54034','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','54035','WGS_1984_Equal_Earth_Greenwich',NULL,NULL,NULL,'EPSG','4326',NULL,NULL,'PROJCS["WGS_1984_Equal_Earth_Greenwich",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equal_Earth"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],UNIT["Meter",1.0]]',1);
|
||||
INSERT INTO "conversion" VALUES('ESRI','54035','unnamed',NULL,'EPSG','1078','Equal Earth','EPSG','8802','Longitude of natural origin',0.0,'EPSG','9102','EPSG','8806','False easting',0.0,'EPSG','9001','EPSG','8807','False northing',0.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'CONV_54035_USAGE','conversion','ESRI','54035','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','54035','WGS_1984_Equal_Earth_Greenwich',NULL,'EPSG','4400','EPSG','4326','ESRI','54035',NULL,1);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_54035_USAGE','projected_crs','ESRI','54035','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','54036','WGS_1984_Equal_Earth_Americas',NULL,NULL,NULL,'EPSG','4326',NULL,NULL,'PROJCS["WGS_1984_Equal_Earth_Americas",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equal_Earth"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-90.0],UNIT["Meter",1.0]]',1);
|
||||
INSERT INTO "conversion" VALUES('ESRI','54036','unnamed',NULL,'EPSG','1078','Equal Earth','EPSG','8802','Longitude of natural origin',-90.0,'EPSG','9102','EPSG','8806','False easting',0.0,'EPSG','9001','EPSG','8807','False northing',0.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'CONV_54036_USAGE','conversion','ESRI','54036','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','54036','WGS_1984_Equal_Earth_Americas',NULL,'EPSG','4400','EPSG','4326','ESRI','54036',NULL,1);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_54036_USAGE','projected_crs','ESRI','54036','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','54037','WGS_1984_Equal_Earth_Asia_Pacific',NULL,NULL,NULL,'EPSG','4326',NULL,NULL,'PROJCS["WGS_1984_Equal_Earth_Asia_Pacific",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equal_Earth"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",150.0],UNIT["Meter",1.0]]',1);
|
||||
INSERT INTO "conversion" VALUES('ESRI','54037','unnamed',NULL,'EPSG','1078','Equal Earth','EPSG','8802','Longitude of natural origin',150.0,'EPSG','9102','EPSG','8806','False easting',0.0,'EPSG','9001','EPSG','8807','False northing',0.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'CONV_54037_USAGE','conversion','ESRI','54037','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','54037','WGS_1984_Equal_Earth_Asia_Pacific',NULL,'EPSG','4400','EPSG','4326','ESRI','54037',NULL,1);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_54037_USAGE','projected_crs','ESRI','54037','EPSG','1262','EPSG','1024');
|
||||
INSERT INTO "projected_crs" VALUES('ESRI','54042','World_Winkel_Tripel_NGS',NULL,NULL,NULL,'EPSG','4326',NULL,NULL,'PROJCS["World_Winkel_Tripel_NGS",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Winkel_Tripel"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",50.467],UNIT["Meter",1.0]]',0);
|
||||
INSERT INTO "usage" VALUES('ESRI', 'PCRS_54042_USAGE','projected_crs','ESRI','54042','EPSG','1262','EPSG','1024');
|
||||
|
||||
+2
-1
@@ -240,7 +240,7 @@ INSERT INTO "extent" VALUES('EPSG','1260','Zambia','Zambia.',-18.08,-8.19,21.99,
|
||||
INSERT INTO "extent" VALUES('EPSG','1261','Zimbabwe','Zimbabwe.',-22.42,-15.61,25.23,33.08,0);
|
||||
INSERT INTO "extent" VALUES('EPSG','1262','World','World.',-90.0,90.0,-180.0,180.0,0);
|
||||
INSERT INTO "extent" VALUES('EPSG','1263','Not specified','Not specified.',-90.0,90.0,-180.0,180.0,0);
|
||||
INSERT INTO "extent" VALUES('EPSG','1264','UK - Great Britain; Isle of Man','United Kingdom (UK) - Great Britain - England and Wales onshore, Scotland onshore and Western Isles nearshore; Isle of Man onshore.',49.79,60.94,-8.82,1.92,0);
|
||||
INSERT INTO "extent" VALUES('EPSG','1264','UK - Great Britain onshore and nearshore; Isle of Man','United Kingdom (UK) - Great Britain - England and Wales onshore, Scotland onshore and Western Isles nearshore including Sea of the Hebrides and The Minch; Isle of Man onshore.',49.797,60.935,-8.818,1.92,0);
|
||||
INSERT INTO "extent" VALUES('EPSG','1265','Argentina - Comodoro Rivadavia','Argentina - Comodoro Rivadavia area.',-46.7,-45.19,-69.5,-67.1,0);
|
||||
INSERT INTO "extent" VALUES('EPSG','1266','Venezuela - Puerto La Cruz','Venezuela - Puerto La Cruz area.',10.0,10.31,-64.7,-64.5,0);
|
||||
INSERT INTO "extent" VALUES('EPSG','1267','Venezuela - Barinas','Venezuela - Barinas area.',7.31,9.07,-71.49,-67.58,0);
|
||||
@@ -3591,3 +3591,4 @@ INSERT INTO "extent" VALUES('EPSG','4612','Canada - Newfoundland','Canada - Newf
|
||||
INSERT INTO "extent" VALUES('EPSG','4613','Europe - Lyon-Turin','France and Italy - on or related to the rail route from Lyon to Turin.',44.87236950014,45.88320957683,4.6505192204449,7.8772423467624,0);
|
||||
INSERT INTO "extent" VALUES('EPSG','4614','Argentina - Comodoro Rivadavia - west of 67.5°W','Argentina - Comodoro Rivadavia area west of 67°30''W.',-46.699998855591,-45.199998855591,-69.5,-67.5,0);
|
||||
INSERT INTO "extent" VALUES('EPSG','4615','Norway, Svalbard and Jan Mayen - offshore','Norway (offshore) and Svalbard and Jan Mayen (offshore).',56.087,84.723,-13.63,38.0,0);
|
||||
INSERT INTO "extent" VALUES('EPSG','4616','UK - Great Britain onshore; Isle of Man','United Kingdom (UK) - Great Britain - England, Scotland and Wales onshore; Isle of Man onshore.',49.815037348282,60.926651214189,-8.6861861839429,1.9002468741098,0);
|
||||
|
||||
@@ -434,7 +434,7 @@ INSERT INTO "geodetic_crs" VALUES('EPSG','4275','NTF',NULL,'geographic 2D','EPSG
|
||||
INSERT INTO "usage" VALUES('EPSG','3157','geodetic_crs','EPSG','4275','EPSG','3694','EPSG','1027');
|
||||
INSERT INTO "geodetic_crs" VALUES('EPSG','4276','NSWC 9Z-2',NULL,'geographic 2D','EPSG','6422','EPSG','6276',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','3158','geodetic_crs','EPSG','4276','EPSG','1262','EPSG','1027');
|
||||
INSERT INTO "geodetic_crs" VALUES('EPSG','4277','OSGB 1936',NULL,'geographic 2D','EPSG','6422','EPSG','6277',NULL,0);
|
||||
INSERT INTO "geodetic_crs" VALUES('EPSG','4277','OSGB36',NULL,'geographic 2D','EPSG','6422','EPSG','6277',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','3159','geodetic_crs','EPSG','4277','EPSG','4390','EPSG','1027');
|
||||
INSERT INTO "geodetic_crs" VALUES('EPSG','4278','OSGB70',NULL,'geographic 2D','EPSG','6422','EPSG','6278',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','3160','geodetic_crs','EPSG','4278','EPSG','1264','EPSG','1027');
|
||||
@@ -2120,3 +2120,9 @@ INSERT INTO "geodetic_crs" VALUES('EPSG','9695','REDGEOMIN',NULL,'geographic 3D'
|
||||
INSERT INTO "usage" VALUES('EPSG','14947','geodetic_crs','EPSG','9695','EPSG','1066','EPSG','1181');
|
||||
INSERT INTO "geodetic_crs" VALUES('EPSG','9696','REDGEOMIN',NULL,'geographic 2D','EPSG','6422','EPSG','1304',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','14949','geodetic_crs','EPSG','9696','EPSG','1066','EPSG','1183');
|
||||
INSERT INTO "geodetic_crs" VALUES('EPSG','9700','ETRF2000-PL',NULL,'geocentric','EPSG','6500','EPSG','1305',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15062','geodetic_crs','EPSG','9700','EPSG','1192','EPSG','1027');
|
||||
INSERT INTO "geodetic_crs" VALUES('EPSG','9701','ETRF2000-PL',NULL,'geographic 3D','EPSG','6423','EPSG','1305',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15063','geodetic_crs','EPSG','9701','EPSG','1192','EPSG','1027');
|
||||
INSERT INTO "geodetic_crs" VALUES('EPSG','9702','ETRF2000-PL',NULL,'geographic 2D','EPSG','6422','EPSG','1305',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15131','geodetic_crs','EPSG','9702','EPSG','1192','EPSG','1183');
|
||||
|
||||
@@ -328,6 +328,8 @@ INSERT INTO "geodetic_datum" VALUES('EPSG','1295','Lyon Turin Ferroviaire 2004',
|
||||
INSERT INTO "usage" VALUES('EPSG','14538','geodetic_datum','EPSG','1295','EPSG','4613','EPSG','1271');
|
||||
INSERT INTO "geodetic_datum" VALUES('EPSG','1304','Red Geodesica Para Mineria en Chile',NULL,'EPSG','7019','EPSG','8901','2019-01-01',2019.0,NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15025','geodetic_datum','EPSG','1304','EPSG','1066','EPSG','1181');
|
||||
INSERT INTO "geodetic_datum" VALUES('EPSG','1305','ETRF2000 Poland',NULL,'EPSG','7019','EPSG','8901','2012-11-15',NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15061','geodetic_datum','EPSG','1305','EPSG','1192','EPSG','1180');
|
||||
INSERT INTO "geodetic_datum" VALUES('EPSG','6001','Not specified (based on Airy 1830 ellipsoid)',NULL,'EPSG','7001','EPSG','8901',NULL,NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','13422','geodetic_datum','EPSG','6001','EPSG','1263','EPSG','1213');
|
||||
INSERT INTO "geodetic_datum" VALUES('EPSG','6002','Not specified (based on Airy Modified 1849 ellipsoid)',NULL,'EPSG','7002','EPSG','8901',NULL,NULL,NULL,0);
|
||||
@@ -718,7 +720,7 @@ INSERT INTO "geodetic_datum" VALUES('EPSG','6275','Nouvelle Triangulation Franca
|
||||
INSERT INTO "usage" VALUES('EPSG','13616','geodetic_datum','EPSG','6275','EPSG','3694','EPSG','1153');
|
||||
INSERT INTO "geodetic_datum" VALUES('EPSG','6276','NSWC 9Z-2',NULL,'EPSG','7025','EPSG','8901','1976-01-01',NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','13617','geodetic_datum','EPSG','6276','EPSG','1262','EPSG','1245');
|
||||
INSERT INTO "geodetic_datum" VALUES('EPSG','6277','OSGB 1936',NULL,'EPSG','7001','EPSG','8901','1936-01-01',NULL,NULL,0);
|
||||
INSERT INTO "geodetic_datum" VALUES('EPSG','6277','Ordnance Survey of Great Britain 1936',NULL,'EPSG','7001','EPSG','8901','1936',NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','13618','geodetic_datum','EPSG','6277','EPSG','4390','EPSG','1153');
|
||||
INSERT INTO "geodetic_datum" VALUES('EPSG','6278','OSGB 1970 (SN)',NULL,'EPSG','7001','EPSG','8901','1970-01-01',NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','13619','geodetic_datum','EPSG','6278','EPSG','1264','EPSG','1027');
|
||||
|
||||
@@ -85,6 +85,8 @@ VALUES
|
||||
-- ch_swisstopo - Swisstopo Federal Office of Topography
|
||||
('CHENyx06a.gsb','ch_swisstopo_CHENyx06a.tif','CHENyx06a.gsb','GTiff','hgridshift',0,NULL,'https://cdn.proj.org/ch_swisstopo_CHENyx06a.tif',1,1,NULL),
|
||||
('CHENyx06_ETRS.gsb','ch_swisstopo_CHENyx06_ETRS.tif','CHENyx06_ETRS.gsb','GTiff','hgridshift',0,NULL,'https://cdn.proj.org/ch_swisstopo_CHENyx06_ETRS.tif',1,1,NULL),
|
||||
('chgeo2004_ETRS.agr','ch_swisstopo_chgeo2004_ETRS89_LHN95.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/ch_swisstopo_chgeo2004_ETRS89_LHN95.tif',1,1,NULL),
|
||||
('chgeo2004_htrans_ETRS.agr','ch_swisstopo_chgeo2004_ETRS89_LN02.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/ch_swisstopo_chgeo2004_ETRS89_LN02.tif',1,1,NULL),
|
||||
|
||||
-- de_adv - Arbeitsgemeinschaft der Vermessungsverwaltungender der Länder der Bundesrepublik Deutschland (AdV)
|
||||
('BETA2007.gsb','de_adv_BETA2007.tif','BETA2007.gsb','GTiff','hgridshift',0,NULL,'https://cdn.proj.org/de_adv_BETA2007.tif',1,1,NULL),
|
||||
@@ -116,6 +118,10 @@ VALUES
|
||||
('EGM08_REDNAP.txt','es_ign_egm08-rednap.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/es_ign_egm08-rednap.tif',1,1,NULL),
|
||||
('EGM08_REDNAP_Canarias.txt','es_ign_egm08-rednap-canarias.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/es_ign_egm08-rednap-canarias.tif',1,1,NULL),
|
||||
|
||||
-- eur_nkg - Nordic Geodetic Commission
|
||||
('eur_nkg_nkgrf03vel_realigned.tif','eur_nkg_nkgrf03vel_realigned.tif',NULL,'GTiff','velocity_grid',0,NULL,'https://cdn.proj.org/eur_nkg_nkgrf03vel_realigned.tif',1,1,NULL),
|
||||
('eur_nkg_nkgrf17vel.tif','eur_nkg_nkgrf17vel.tif',NULL,'GTiff','velocity_grid',0,NULL,'https://cdn.proj.org/eur_nkg_nkgrf17vel.tif',1,1,NULL),
|
||||
|
||||
-- fi_nls - National Land Survey of Finland (MML)
|
||||
('fi_nls_n43_n60.json','fi_nls_n43_n60.json',NULL,'JSON','tinshift',0,NULL,'https://cdn.proj.org/fi_nls_n43_n60.json',1,1,NULL),
|
||||
('fi_nls_n60_n2000.json','fi_nls_n60_n2000.json',NULL,'JSON','tinshift',0,NULL,'https://cdn.proj.org/fi_nls_n60_n2000.json',1,1,NULL),
|
||||
@@ -184,6 +190,8 @@ VALUES
|
||||
-- Norwegian grids
|
||||
('HREF2018B_NN2000_EUREF89.gtx','no_kv_HREF2018B_NN2000_EUREF89.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/no_kv_HREF2018B_NN2000_EUREF89.tif',1,1,NULL),
|
||||
('href2008a.gtx','no_kv_href2008a.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/no_kv_href2008a.tif',1,1,NULL),
|
||||
('no_kv_NKGETRF14_EPSG7922_2000.tif','no_kv_NKGETRF14_EPSG7922_2000.tif',NULL,'GTiff','geocentricoffset',0,NULL,'https://cdn.proj.org/no_kv_NKGETRF14_EPSG7922_2000.tif',1,1,NULL),
|
||||
('no_kv_ETRS89NO_NGO48_TIN.json','no_kv_ETRS89NO_NGO48_TIN.json',NULL,'JSON','tinshift',0,NULL,'https://cdn.proj.org/no_kv_ETRS89NO_NGO48_TIN.json',1,1,NULL),
|
||||
|
||||
-- nz_linz - New Zealand
|
||||
('nzgd2kgrid0005.gsb','nz_linz_nzgd2kgrid0005.tif','nzgd2kgrid0005.gsb','GTiff','hgridshift',0,NULL,'https://cdn.proj.org/nz_linz_nzgd2kgrid0005.tif',1,1,NULL),
|
||||
|
||||
@@ -323,9 +323,9 @@ INSERT INTO "usage" VALUES('EPSG','9347','grid_transformation','EPSG','5334','EP
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','5335','ETRS89 to Malin Head height (1)','May be used for transformations from WGS 84 to Malin Head. Replaced by ETRS89 to Malin Head height (2) (code 7959).','EPSG','1045','Geographic3D to GravityRelatedHeight (OSGM02-Ire)','EPSG','4937','EPSG','5731',0.04,'EPSG','8666','Geoid (height correction) model file','OSGM02_RoI.txt',NULL,NULL,NULL,NULL,NULL,NULL,'OS-Ire',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','9348','grid_transformation','EPSG','5335','EPSG','1305','EPSG','1133');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','5338','OSGB 1936 to ETRS89 (1)','Approximate alternative to official OSTN02 method (tfm code 7952). Accuracy at 2000 test points compared to OSTN02 (tfm code 1039): latitude 0.5mm av, 17mm max; longitude 0.8mm av, 23mm max. May be taken as approximate CT to WGS 84 - see code 5339.','EPSG','9615','NTv2','EPSG','4277','EPSG','4258',0.03,'EPSG','8656','Latitude and longitude difference file','OSTN02_NTv2.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'OSGB-UK Gbr02 NT',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','9349','grid_transformation','EPSG','5338','EPSG','1264','EPSG','1273');
|
||||
INSERT INTO "usage" VALUES('EPSG','9349','grid_transformation','EPSG','5338','EPSG','4616','EPSG','1273');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','5339','OSGB 1936 to WGS 84 (7)','Parameter values taken from OSGB 1936 to ETRS89 (1) (tfm code 5338) assuming that ETRS89 is coincident with WGS 84 within the accuracy of the tfm. Within accuracy of the tfm equivalent to OSGB 1936 / British National Grid to WGS 84 (2) (tfm code 15956).','EPSG','9615','NTv2','EPSG','4277','EPSG','4326',1.0,'EPSG','8656','Latitude and longitude difference file','OSTN02_NTv2.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'OGP-UK Gbr02 NT',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','9350','grid_transformation','EPSG','5339','EPSG','1264','EPSG','1041');
|
||||
INSERT INTO "usage" VALUES('EPSG','9350','grid_transformation','EPSG','5339','EPSG','4616','EPSG','1041');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','5409','NGVD29 height to NAVD88 height (1)','Interpolation within the gridded data file may be made using any of the horizontal CRSs NAD27, NAD83 or NAD83(HARN).','EPSG','9658','Vertical Offset by Grid Interpolation (VERTCON)','EPSG','5702','EPSG','5703',0.02,'EPSG','8732','Vertical offset file','vertconw.94',NULL,NULL,NULL,NULL,NULL,NULL,'NGS-US Conus W',1);
|
||||
INSERT INTO "usage" VALUES('EPSG','9377','grid_transformation','EPSG','5409','EPSG','2950','EPSG','1255');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','5410','NGVD29 height to NAVD88 height (2)','Interpolation within the gridded data file may be made using any of the horizontal CRSs NAD27, NAD83 or NAD83(HARN).','EPSG','9658','Vertical Offset by Grid Interpolation (VERTCON)','EPSG','5702','EPSG','5703',0.02,'EPSG','8732','Vertical offset file','vertconc.94',NULL,NULL,NULL,NULL,NULL,NULL,'NGS-US Conus C',1);
|
||||
@@ -424,9 +424,9 @@ INSERT INTO "grid_transformation" VALUES('EPSG','7673','CH1903 to CHTRF95 (1)','
|
||||
INSERT INTO "usage" VALUES('EPSG','10205','grid_transformation','EPSG','7673','EPSG','1286','EPSG','1084');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','7674','CH1903 to ETRS89 (2)','Replaces tfm code 1646. Equivalent to concatenation of transformations 15486 and 1647 to within 2cm. Also used as transformation between CH1903 and CHTRF95 (see code 7673). May be used as approximate tfm CH1903 to WGS 84 - see code 7788.','EPSG','9615','NTv2','EPSG','4149','EPSG','4258',0.25,'EPSG','8656','Latitude and longitude difference file','CHENyx06_ETRS.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'BfL-Che NTv2',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','10206','grid_transformation','EPSG','7674','EPSG','1286','EPSG','1083');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','7709','OSGB 1936 to ETRS89 (2)','Approximate alternative to official OSTN15 method (tfm code 7953). May be taken as approximate transformation OSGB 1936 to WGS 84 - see code 7710. Replaces OSGB 1936 to ETRS89 (1) (tfm code 5338).','EPSG','9615','NTv2','EPSG','4277','EPSG','4258',0.03,'EPSG','8656','Latitude and longitude difference file','OSTN15_NTv2_OSGBtoETRS.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'OSGB-UK Gbr15 NT',0);
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','7709','OSGB36 to ETRS89 (2)','Approximate alternative to official OSTN15 method (tfm code 7953). May be taken as approximate transformation OSGB36 to WGS 84 - see code 7710. Replaces OSGB36 to ETRS89 (1) (tfm code 5338).','EPSG','9615','NTv2','EPSG','4277','EPSG','4258',0.03,'EPSG','8656','Latitude and longitude difference file','OSTN15_NTv2_OSGBtoETRS.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'OSGB-UK Gbr15 NT',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','10222','grid_transformation','EPSG','7709','EPSG','4390','EPSG','1273');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','7710','OSGB 1936 to WGS 84 (9)','Parameter values taken from OSGB 1936 to ETRS89 (3) (tfm code 7709) assuming that ETRS89 is coincident with WGS 84 within the accuracy of the tfm. Replaces OSGB 1936 to WGS 84 (7) (tfm code 5339).','EPSG','9615','NTv2','EPSG','4277','EPSG','4326',1.0,'EPSG','8656','Latitude and longitude difference file','OSTN15_NTv2_OSGBtoETRS.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'OGP-UK Gbr15 NT',0);
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','7710','OSGB36 to WGS 84 (9)','Parameter values taken from OSGB36 to ETRS89 (3) (tfm code 7709) assuming that ETRS89 is coincident with WGS 84 within the accuracy of the tfm. Replaces OSGB36 to WGS 84 (7) (tfm code 5339).','EPSG','9615','NTv2','EPSG','4277','EPSG','4326',1.0,'EPSG','8656','Latitude and longitude difference file','OSTN15_NTv2_OSGBtoETRS.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'OGP-UK Gbr15 NT',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','10223','grid_transformation','EPSG','7710','EPSG','4390','EPSG','1252');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','7711','ETRS89 to ODN height (2)','OSGM15 supersedes OSGM02 geoid model. Replaces ETRS89 to Newlyn height (1) (tfm code 10021). For reversible alternative to this transformation see ETRS89 to ETRS89 + ODN height (2) (code 9587).','EPSG','9663','Geographic3D to GravityRelatedHeight (OSGM-GB)','EPSG','4937','EPSG','5701',0.008,'EPSG','8666','Geoid (height correction) model file','OSTN15_OSGM15_GB.txt',NULL,NULL,NULL,NULL,NULL,NULL,'OS-UK Gbr 2015',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','14515','grid_transformation','EPSG','7711','EPSG','2792','EPSG','1133');
|
||||
@@ -1030,6 +1030,24 @@ INSERT INTO "grid_transformation" VALUES('EPSG','9648','RH2000 height to EVRF201
|
||||
INSERT INTO "usage" VALUES('EPSG','14697','grid_transformation','EPSG','9648','EPSG','3313','EPSG','1059');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9649','RH2000 height to EVRF2019 mean-tide height (1)','Determined at 3356 points, SD 0.016m. Offset: mean 0.036m, minimum 0.003m, maximum 0.071m.','EPSG','1085','Vertical Offset by Grid Interpolation (asc)','EPSG','5613','EPSG','9390',0.032,'EPSG','8732','Vertical offset file','se_2019m.asc',NULL,NULL,NULL,NULL,'EPSG','4258','EuG-Swe 2019m 2020-09',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','14778','grid_transformation','EPSG','9649','EPSG','3313','EPSG','1059');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9652','Baltic 1986 height to EVRF2019 height (1)','Determined at 300 points, SD 0.010m. Offset: mean 0.178m, minimum 0.144m, maximum 0.203m. May also use CRS 9702 (ETRF2000-PL) as interpolation CRS.','EPSG','1085','Vertical Offset by Grid Interpolation (asc)','EPSG','9650','EPSG','9389',0.02,'EPSG','8732','Vertical offset file','pl86_2019z.asc',NULL,NULL,NULL,NULL,'EPSG','4258','EuG-Pol 2019z 2020-09',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15035','grid_transformation','EPSG','9652','EPSG','3293','EPSG','1059');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9653','Baltic 1986 height to EVRF2019 mean-tide height (1)','Determined at 300 points, SD 0.010m. Offset: mean 0.176m, minimum 0.133m, maximum 0.201m. May also use CRS 9702 (ETRF2000-PL) as interpolation CRS.','EPSG','1085','Vertical Offset by Grid Interpolation (asc)','EPSG','9650','EPSG','9390',0.02,'EPSG','8732','Vertical offset file','pl86_2019m.asc',NULL,NULL,NULL,NULL,'EPSG','4258','EuG-Pol 2019m 2020-09',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15036','grid_transformation','EPSG','9653','EPSG','3293','EPSG','1059');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9654','EVRF2007-PL height to EVRF2019 height (1)','Determined at 319 points, SD 0.003m. Offset: mean 0.012m, minimum 0.002m, maximum 0.024m. May also use CRS 9702 (ETRF2000-PL) as interpolation CRS.','EPSG','1085','Vertical Offset by Grid Interpolation (asc)','EPSG','9651','EPSG','9389',0.006,'EPSG','8732','Vertical offset file','pl07_2019z.asc',NULL,NULL,NULL,NULL,'EPSG','4258','EuG-Pol 2019z 2020-09',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15037','grid_transformation','EPSG','9654','EPSG','3293','EPSG','1059');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9655','EVRF2000-PL height to EVRF2019 mean-tide height (1)','Determined at 319 points, SD 0.006m. Offset: mean 0.011m, minimum -0.006m, maximum 0.022m. May also use CRS 9702 (ETRF2000-PL) as interpolation CRS.','EPSG','1085','Vertical Offset by Grid Interpolation (asc)','EPSG','9651','EPSG','9390',0.012,'EPSG','8732','Vertical offset file','pl07_2019m.asc',NULL,NULL,NULL,NULL,'EPSG','4258','EuG-Pol 2019m 2020-09',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15038','grid_transformation','EPSG','9655','EPSG','3293','EPSG','1059');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9658','ETRF2000-PL to Baltic 1986 height (1)','For reversible alternative to this transformation see ETRF2000-PL to ETRF2000-PL + Baltic 1986 height (1) (code 9659).','EPSG','1099','Geographic3D to GravityRelatedHeight (PL txt)','EPSG','9702','EPSG','9650',0.03,'EPSG','8666','Geoid (height correction) model file','gugik-geoid2011-PL-KRON86-NH.txt',NULL,NULL,NULL,NULL,NULL,NULL,'GUGiK-Pol geoid11 KRON86',1);
|
||||
INSERT INTO "usage" VALUES('EPSG','15013','grid_transformation','EPSG','9658','EPSG','3293','EPSG','1133');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9659','ETRF2000-PL to ETRF2000-PL + Baltic 1986 height (1)','Reversible alternative to ETRF2000-PL to Baltic 1986 height (1) (code 9658).','EPSG','1100','Geog3D to Geog2D+GravityRelatedHeight (PL txt)','EPSG','9702','EPSG','9656',0.03,'EPSG','8666','Geoid (height correction) model file','gugik-geoid2011-PL-KRON86-NH.txt',NULL,NULL,NULL,NULL,'EPSG','9702','GUGiK-Pol geoid11 KRON86',1);
|
||||
INSERT INTO "usage" VALUES('EPSG','15106','grid_transformation','EPSG','9659','EPSG','3293','EPSG','1270');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9660','ETRF2000-PL to EVRF2007-PL height (1)','For reversible alternative to this transformation see ETRF2000-PL to ETRF2000-PL + EVRF2007-PL height (1) (code 9661).','EPSG','1099','Geographic3D to GravityRelatedHeight (PL txt)','EPSG','9702','EPSG','9651',0.03,'EPSG','8666','Geoid (height correction) model file','gugik-geoid2011-PL-EVRF2007-NH.txt',NULL,NULL,NULL,NULL,NULL,NULL,'GUGiK-Pol geoid11 EVRF07',1);
|
||||
INSERT INTO "usage" VALUES('EPSG','15039','grid_transformation','EPSG','9660','EPSG','3293','EPSG','1133');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9661','ETRF2000-PL to ETRF2000-PL + EVRF2007-PL height (1)','Reversible alternative to ETRF2000-PL to EVRF2007-PL height (1) (code 9660).','EPSG','1100','Geog3D to Geog2D+GravityRelatedHeight (PL txt)','EPSG','9702','EPSG','9657',0.03,'EPSG','8666','Geoid (height correction) model file','gugik-geoid2011-PL-EVRF2007-NH.txt',NULL,NULL,NULL,NULL,'EPSG','9702','GUGiK-Pol geoid11 EVRF07',1);
|
||||
INSERT INTO "usage" VALUES('EPSG','15107','grid_transformation','EPSG','9661','EPSG','3293','EPSG','1270');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9662','Baltic 1986 height to EVRF2007-PL height (1)','Gives same result as differencing quasi-geoid models geoid2011-KRON86 and geoid2011-EVRF2007 (transformations 9658 and 9660).','EPSG','1101','Vertical Offset by Grid Interpolation (PL txt)','EPSG','9650','EPSG','9651',0.04,'EPSG','8732','Vertical offset file','gugik-evrf2007.txt',NULL,NULL,NULL,NULL,'EPSG','9702','GUGiK-Pol',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15052','grid_transformation','EPSG','9662','EPSG','3293','EPSG','1059');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9664','EH2000 height to EVRF2019 height (1)','Determined at 367 points, SD 0.001m. Offset: mean 0.011m, minimum 0.008m, maximum 0.013m.','EPSG','1085','Vertical Offset by Grid Interpolation (asc)','EPSG','9663','EPSG','9389',0.002,'EPSG','8732','Vertical offset file','ee_2019z.asc',NULL,NULL,NULL,NULL,'EPSG','4258','EuG-Est 2019z 2020-09',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','14748','grid_transformation','EPSG','9664','EPSG','3246','EPSG','1059');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9665','EH2000 height to EVRF2019 mean-tide height (1)','Determined at 367 points, SD 0.002m. Offset: mean 0.041m, minimum 0.037m, maximum 0.045m.','EPSG','1085','Vertical Offset by Grid Interpolation (asc)','EPSG','9663','EPSG','9390',0.004,'EPSG','8732','Vertical offset file','ee_2019m.asc',NULL,NULL,NULL,NULL,'EPSG','4258','EuG-Est 2019m 2020-09',0);
|
||||
@@ -1056,6 +1074,14 @@ INSERT INTO "grid_transformation" VALUES('EPSG','9706','WGS 84 to WGS 84 + MSL h
|
||||
INSERT INTO "usage" VALUES('EPSG','15105','grid_transformation','EPSG','9706','EPSG','1262','EPSG','1270');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9708','WGS 84 to WGS 84 + EGM96 height (1)','Reversible alternative to WGS 84 to EGM96 height (1) (code 10084).','EPSG','1103','Geog3D to Geog2D+GravityRelatedHeight (EGM)','EPSG','4979','EPSG','9707',1.0,'EPSG','8666','Geoid (height correction) model file','WW15MGH.GRD',NULL,NULL,NULL,NULL,'EPSG','4326','NGA-World',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15101','grid_transformation','EPSG','9708','EPSG','1262','EPSG','1270');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9717','ETRF2000-PL to Baltic 1986 height (1)','For reversible alternative to this transformation see ETRF2000-PL to ETRF2000-PL + Baltic 1986 height (1) (code 9718).','EPSG','1099','Geographic3D to GravityRelatedHeight (PL txt)','EPSG','9701','EPSG','9650',0.03,'EPSG','8666','Geoid (height correction) model file','gugik-geoid2011-PL-KRON86-NH.txt',NULL,NULL,NULL,NULL,NULL,NULL,'GUGiK-Pol geoid11 KRON86',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15236','grid_transformation','EPSG','9717','EPSG','3293','EPSG','1133');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9718','ETRF2000-PL to ETRF2000-PL + Baltic 1986 height (1)','Reversible alternative to ETRF2000-PL to Baltic 1986 height (1) (code 9717).','EPSG','1100','Geog3D to Geog2D+GravityRelatedHeight (PL txt)','EPSG','9701','EPSG','9656',0.03,'EPSG','8666','Geoid (height correction) model file','gugik-geoid2011-PL-KRON86-NH.txt',NULL,NULL,NULL,NULL,'EPSG','9702','GUGiK-Pol geoid11 KRON86',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15237','grid_transformation','EPSG','9718','EPSG','3293','EPSG','1270');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9719','ETRF2000-PL to EVRF2007-PL height (1)','For reversible alternative to this transformation see ETRF2000-PL to ETRF2000-PL + EVRF2007-PL height (1) (code 9720).','EPSG','1099','Geographic3D to GravityRelatedHeight (PL txt)','EPSG','9701','EPSG','9651',0.03,'EPSG','8666','Geoid (height correction) model file','gugik-geoid2011-PL-EVRF2007-NH.txt',NULL,NULL,NULL,NULL,NULL,NULL,'GUGiK-Pol geoid11 EVRF07',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15238','grid_transformation','EPSG','9719','EPSG','3293','EPSG','1133');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','9720','ETRF2000-PL to ETRF2000-PL + EVRF2007-PL height (1)','Reversible alternative to ETRF2000-PL to EVRF2007-PL height (1) (code 9719).','EPSG','1100','Geog3D to Geog2D+GravityRelatedHeight (PL txt)','EPSG','9701','EPSG','9657',0.03,'EPSG','8666','Geoid (height correction) model file','gugik-geoid2011-PL-EVRF2007-NH.txt',NULL,NULL,NULL,NULL,'EPSG','9702','GUGiK-Pol geoid11 EVRF07',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15239','grid_transformation','EPSG','9720','EPSG','3293','EPSG','1270');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','10000','RGF93 to NGF-IGN69 height (1)','May be used for transformations from WGS 84 to NGF-IGN69 height. Accuracy at each 0.1 deg x 0.1 degree grid node is given within the geoid model file.','EPSG','9664','Geographic3D to GravityRelatedHeight (IGN1997)','EPSG','4965','EPSG','5720',0.5,'EPSG','8666','Geoid (height correction) model file','ggf97a.txt',NULL,NULL,NULL,NULL,NULL,NULL,'IGN Fra',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','11001','grid_transformation','EPSG','10000','EPSG','1326','EPSG','1133');
|
||||
INSERT INTO "grid_transformation" VALUES('EPSG','10001','ETRS89 to NGF-IGN69 height (1)','Parameter values taken from RGF93 to NGF-IGN69 height (1) (code 10000) assuming that RGF93 is equivalent to ETRS89 within the accuracy of the transformation. Accuracy at each 0.1 deg x 0.1 degree grid node is given within the geoid model file.','EPSG','9664','Geographic3D to GravityRelatedHeight (IGN1997)','EPSG','4937','EPSG','5720',0.5,'EPSG','8666','Geoid (height correction) model file','ggf97a.txt',NULL,NULL,NULL,NULL,NULL,NULL,'IGN Fra',0);
|
||||
|
||||
@@ -169,3 +169,45 @@ INSERT INTO "usage" VALUES(
|
||||
'EPSG','3263', -- area of use: Japan - onshore mainland
|
||||
'EPSG','1024' -- unknown
|
||||
);
|
||||
|
||||
-- Switzerland
|
||||
|
||||
INSERT INTO "grid_transformation" VALUES(
|
||||
'PROJ','EPSG_4937_TO_EPSG_5729','ETRS89 to LHN95 height',
|
||||
NULL,
|
||||
'EPSG','9665','Geographic3D to GravityRelatedHeight (gtx)',
|
||||
'EPSG','4937', -- source CRS (ETRS89)
|
||||
'EPSG','5729', -- target CRS (LHN95 height)
|
||||
NULL,
|
||||
'EPSG','8666','Geoid (height correction) model file','chgeo2004_ETRS.agr',
|
||||
NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
|
||||
INSERT INTO "usage" VALUES(
|
||||
'PROJ',
|
||||
'EPSG_4937_TO_EPSG_5729_USAGE',
|
||||
'grid_transformation',
|
||||
'PROJ',
|
||||
'EPSG_4937_TO_EPSG_5729',
|
||||
'EPSG','1286', -- area of use: Europe - Liechtenstein and Switzerland
|
||||
'EPSG','1024' -- unknown
|
||||
);
|
||||
|
||||
INSERT INTO "grid_transformation" VALUES(
|
||||
'PROJ','EPSG_4937_TO_EPSG_5728','ETRS89 to LN02 height',
|
||||
NULL,
|
||||
'EPSG','9665','Geographic3D to GravityRelatedHeight (gtx)',
|
||||
'EPSG','4937', -- source CRS (ETRS89)
|
||||
'EPSG','5728', -- target CRS (LN02 height)
|
||||
NULL,
|
||||
'EPSG','8666','Geoid (height correction) model file','chgeo2004_htrans_ETRS.agr',
|
||||
NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
|
||||
INSERT INTO "usage" VALUES(
|
||||
'PROJ',
|
||||
'EPSG_4937_TO_EPSG_5728_USAGE',
|
||||
'grid_transformation',
|
||||
'PROJ',
|
||||
'EPSG_4937_TO_EPSG_5728',
|
||||
'EPSG','1286', -- area of use: Europe - Liechtenstein and Switzerland
|
||||
'EPSG','1024' -- unknown
|
||||
);
|
||||
|
||||
@@ -272,15 +272,15 @@ INSERT INTO "helmert_transformation" VALUES('EPSG','1193','NTF to WGS 84 (1)','T
|
||||
INSERT INTO "usage" VALUES('EPSG','8114','helmert_transformation','EPSG','1193','EPSG','3694','EPSG','1042');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1194','MGI to WGS 84 (8)','May be taken as approximate transformation MGI to ETRS89 assuming ETRS89 is equivalent to WGS 84 within the accuracy of the transformation - see tfm code 1024. Information source gives scale as -2.388739 ppm.','EPSG','9607','Coordinate Frame rotation (geog2D domain)','EPSG','4312','EPSG','4326',0.5,601.705,84.263,485.227,'EPSG','9001',-4.7354,-1.3145,-5.393,'EPSG','9104',-2.3887,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LBD-Aut Sty',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','8115','helmert_transformation','EPSG','1194','EPSG','1543','EPSG','1035');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1195','OSGB 1936 to WGS 84 (1)','Derived at 38 stations. Accuracy 10m, 10m and 15m in X, Y and Z axes.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',21.0,375.0,-111.0,431.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DMA-Gbr',0);
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1195','OSGB36 to WGS 84 (1)','Derived at 38 stations. Accuracy 10m, 10m and 15m in X, Y and Z axes.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',21.0,375.0,-111.0,431.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DMA-Gbr',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','8116','helmert_transformation','EPSG','1195','EPSG','1264','EPSG','1160');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1196','OSGB 1936 to WGS 84 (2)','Derived at 24 stations. Accuracy 5m, 5m and 6m in X, Y and Z axes.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',10.0,371.0,-112.0,434.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DMA-Gbr Eng',0);
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1196','OSGB36 to WGS 84 (2)','Derived at 24 stations. Accuracy 5m, 5m and 6m in X, Y and Z axes.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',10.0,371.0,-112.0,434.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DMA-Gbr Eng',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','8117','helmert_transformation','EPSG','1196','EPSG','2395','EPSG','1160');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1197','OSGB 1936 to WGS 84 (3)','Derived at 25 stations. Accuracy 10m, 10m and 15m in X, Y and Z axes.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',21.0,371.0,-111.0,434.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DMA-Gbr E&W',0);
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1197','OSGB36 to WGS 84 (3)','Derived at 25 stations. Accuracy 10m, 10m and 15m in X, Y and Z axes.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',21.0,371.0,-111.0,434.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DMA-Gbr E&W',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','8118','helmert_transformation','EPSG','1197','EPSG','2396','EPSG','1160');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1198','OSGB 1936 to WGS 84 (4)','Derived at 13 stations. Accuracy 10m in each axis.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',18.0,384.0,-111.0,425.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DMA-Gbr Sco',0);
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1198','OSGB36 to WGS 84 (4)','Derived at 13 stations. Accuracy 10m in each axis.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',18.0,384.0,-111.0,425.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DMA-Gbr Sco',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','8119','helmert_transformation','EPSG','1198','EPSG','2397','EPSG','1160');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1199','OSGB 1936 to WGS 84 (5)','Derived at 3 stations. Accuracy 20m in each axis.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',35.0,370.0,-108.0,434.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DMA-Gbr Wal',0);
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1199','OSGB36 to WGS 84 (5)','Derived at 3 stations. Accuracy 20m in each axis.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',35.0,370.0,-108.0,434.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DMA-Gbr Wal',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','8120','helmert_transformation','EPSG','1199','EPSG','2398','EPSG','1160');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1200','Pointe Noire to WGS 84 (1)','Derived at 1 station. Accuracy 25m in each axis.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4282','EPSG','4326',44.0,-148.0,51.0,-291.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DMA-Cog',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','8121','helmert_transformation','EPSG','1200','EPSG','1072','EPSG','1160');
|
||||
@@ -475,11 +475,11 @@ INSERT INTO "helmert_transformation" VALUES('EPSG','1309','DHDN to ETRS89 (1)','
|
||||
INSERT INTO "usage" VALUES('EPSG','8230','helmert_transformation','EPSG','1309','EPSG','2326','EPSG','1045');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1310','Pulkovo 1942 to ETRS89 (1)','Mean of 20 stations.','EPSG','9607','Coordinate Frame rotation (geog2D domain)','EPSG','4284','EPSG','4258',2.0,24.0,-123.0,-94.0,'EPSG','9001',-0.02,0.25,0.13,'EPSG','9104',1.1,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IfAG-Deu E',1);
|
||||
INSERT INTO "usage" VALUES('EPSG','8231','helmert_transformation','EPSG','1310','EPSG','1343','EPSG','1042');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1311','ED50 to WGS 84 (18)','Recommended transformation for UKCS and IrishCS petroleum purposes. Based on ED50 to WGS72 (precise ephemeris) 6-nations agreement of 1981 to which precise to broadcast and broadcast to WGS 84 transformations have been concatenated.','EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','4230','EPSG','4326',1.0,-89.5,-93.8,-123.1,'EPSG','9001',0.0,0.0,-0.156,'EPSG','9104',1.2,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'UKOOA-CO',0);
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1311','ED50 to WGS 84 (18)','Recommended CT for UKCS and IrishCS petroleum purposes, known as "Common Offshore". Based on ED50 to WGS 72 (precise ephemeris) 6-nations agreement of 1981 with which precise to broadcast and broadcast to WGS 84 transformations have been concatenated.','EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','4230','EPSG','4326',1.0,-89.5,-93.8,-123.1,'EPSG','9001',0.0,0.0,-0.156,'EPSG','9104',1.2,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'UKOOA-CO',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','8232','helmert_transformation','EPSG','1311','EPSG','2342','EPSG','1136');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1314','OSGB 1936 to WGS 84 (6)','For a more accurate transformation see ETRS89 to OSGB 1936 / British National Grid (3) (code 7953).','EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','4277','EPSG','4326',2.0,446.448,-125.157,542.06,'EPSG','9001',0.15,0.247,0.842,'EPSG','9104',-20.489,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'UKOOA-Pet',0);
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1314','OSGB36 to WGS 84 (6)','Commonly referred to as the "OSGB Petroleum transformation". For a more accurate transformation see ETRS89 to OSGB36 / British National Grid (3) (code 7953).','EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','4277','EPSG','4326',2.0,446.448,-125.157,542.06,'EPSG','9001',0.15,0.247,0.842,'EPSG','9104',-20.489,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'UKOOA-Pet',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','8235','helmert_transformation','EPSG','1314','EPSG','1264','EPSG','1136');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1315','OSGB 1936 to ED50 (UKOOA)','This transformation is concatenated from OSGB36 to WGS 84 (Petroleum) (code 1314) minus ED50 to WGS 84 (Common Offshore) (code 1311). Accuracy better than 4m and generally better than 2m.','EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','4277','EPSG','4230',2.0,535.948,-31.357,665.16,'EPSG','9001',0.15,0.247,0.998,'EPSG','9104',-21.689,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'UKOOA-UKCS',0);
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1315','OSGB36 to ED50 (1)','Known as the "UKOOA landward/seaward transformation". This transformation is concatenated from OSGB36 to WGS 84 (6) (Petroleum) (code 1314) minus ED50 to WGS 84 (18) (Common Offshore) (code 1311). Accuracy better than 4m and generally better than 2m.','EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','4277','EPSG','4230',2.0,535.948,-31.357,665.16,'EPSG','9001',0.15,0.247,0.998,'EPSG','9104',-21.689,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'UKOOA-UKCS',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','8236','helmert_transformation','EPSG','1315','EPSG','1264','EPSG','1136');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','1316','Manoca to WGS 84 (1)','','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4260','EPSG','4326',999.0,-70.9,-151.8,-41.4,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'SCS-Cmr',1);
|
||||
INSERT INTO "usage" VALUES('EPSG','8237','helmert_transformation','EPSG','1316','EPSG','1060','EPSG','1025');
|
||||
@@ -1589,7 +1589,7 @@ INSERT INTO "helmert_transformation" VALUES('EPSG','5590','UCS-2000 to WGS 84 (1
|
||||
INSERT INTO "usage" VALUES('EPSG','9476','helmert_transformation','EPSG','5590','EPSG','1242','EPSG','1045');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','5599','FEH2010 to WGS 84 (1)','','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','5593','EPSG','4326',1.0,0.0,0.0,0.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'OGP-Dnk-Deu Feh',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','9479','helmert_transformation','EPSG','5599','EPSG','3889','EPSG','1252');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','5622','OSGB 1936 to WGS 84 (8)','Derived by CGG for 1994 3D seismic survey.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',3.0,370.936,-108.938,435.682,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bp-Gbr WytchF',0);
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','5622','OSGB36 to WGS 84 (8)','Derived by CGG for 1994 3D seismic survey.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4277','EPSG','4326',3.0,370.936,-108.938,435.682,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bp-Gbr WytchF',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','9480','helmert_transformation','EPSG','5622','EPSG','3893','EPSG','1136');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','5630','Nord Sahara 1959 to WGS 84 (8)','Derived at 1 station (L38).','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4307','EPSG','4326',5.0,-168.52,-72.05,304.3,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Tot-Dza Ahnet',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','9482','helmert_transformation','EPSG','5630','EPSG','3917','EPSG','1136');
|
||||
@@ -2424,6 +2424,8 @@ INSERT INTO "helmert_transformation" VALUES('EPSG','9688','GDA94 to WGS 84 (2)',
|
||||
INSERT INTO "usage" VALUES('EPSG','14921','helmert_transformation','EPSG','9688','EPSG','4177','EPSG','1275');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','9690','WGS 84 to GDA2020 (3)','Concatenation of CTs 1150 and 8048 through GDA94. Scale difference in ppb where 1/billion = 1E-9. See WGS 84 to GDA2020 (4) (CT code 9691) for alternative for Australia including distortion model.','EPSG','9607','Coordinate Frame rotation (geog2D domain)','EPSG','4326','EPSG','7844',3.0,61.55,-10.87,-40.19,'EPSG','1025',-39.4924,-32.7221,-32.8979,'EPSG','1031',-9.994,'EPSG','1028',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ICSM-Aus Conf',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','14920','helmert_transformation','EPSG','9690','EPSG','4177','EPSG','1276');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','9703','ETRF2000-PL to ETRS89 (1)','','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','9702','EPSG','4258',0.0,0.0,0.0,0.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IOGP-Pol',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15011','helmert_transformation','EPSG','9703','EPSG','1192','EPSG','1161');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','10085','Trinidad 1903 to WGS 84 (2)','Parameter values provided to EOG by Trinidad Ministry of Energy and Energy Industries. Used by EOG offshore Trinidad (including Pelican, Kiskadee and Ibis fields) since 1996.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4302','EPSG','4326',3.0,-61.0,285.2,471.6,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'EOG-Tto Trin',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','11086','helmert_transformation','EPSG','10085','EPSG','1339','EPSG','1136');
|
||||
INSERT INTO "helmert_transformation" VALUES('EPSG','10086','JAD69 to WGS 72 (1)','Derived in 1977 through Transit observations at 2 stations by US DMA.','EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4242','EPSG','4322',15.0,48.0,208.0,382.0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'SD-Jam',0);
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
INSERT INTO "metadata" VALUES('DATABASE.LAYOUT.VERSION.MAJOR', 1);
|
||||
INSERT INTO "metadata" VALUES('DATABASE.LAYOUT.VERSION.MINOR', 0);
|
||||
|
||||
INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v10.015');
|
||||
INSERT INTO "metadata" VALUES('EPSG.DATE', '2021-02-11');
|
||||
INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v10.018');
|
||||
INSERT INTO "metadata" VALUES('EPSG.DATE', '2021-04-02');
|
||||
|
||||
+179
-14
@@ -2,19 +2,6 @@ INSERT INTO "metadata" VALUES('NKG.SOURCE', 'https://github.com/NordicGeodesy/No
|
||||
INSERT INTO "metadata" VALUES('NKG.VERSION', '1.0.0');
|
||||
INSERT INTO "metadata" VALUES('NKG.DATE', '2020-12-21');
|
||||
|
||||
-- Append NKG to authority references
|
||||
UPDATE
|
||||
authority_to_authority_preference
|
||||
SET
|
||||
allowed_authorities = allowed_authorities || ',NKG'
|
||||
WHERE
|
||||
source_auth_name = 'EPSG' AND target_auth_name = 'EPSG';
|
||||
|
||||
INSERT INTO "authority_to_authority_preference"
|
||||
(source_auth_name,target_auth_name, allowed_authorities)
|
||||
VALUES
|
||||
('NKG', 'EPSG', 'NKG,PROJ,EPSG');
|
||||
|
||||
-- extent for NKG2008 transformations
|
||||
INSERT INTO "extent" VALUES(
|
||||
'NKG','EXTENT_2008', -- extend auth+code
|
||||
@@ -693,7 +680,75 @@ INSERT INTO "usage" VALUES (
|
||||
'NKG', 'SCOPE_GENERIC' -- scope
|
||||
);
|
||||
|
||||
-- NO
|
||||
INSERT INTO "helmert_transformation" VALUES (
|
||||
'NKG','PAR_2020_NO', -- operation auth+code
|
||||
'NKG_ETRF14 to ETRF93@2000.0', -- name
|
||||
'Transformation from NKG_ETRF14 to ETRF93, at transformation reference epoch 2000.0', -- description / remark
|
||||
'EPSG','1033', -- method auth+code
|
||||
'Position Vector transformation (geocentric domain)',
|
||||
'NKG','ETRF14', -- source auth+code
|
||||
'EPSG','7922', -- target auth+code
|
||||
0.01, -- accuracy
|
||||
-0.05172, -- x
|
||||
0.13747, -- y
|
||||
-0.01648, -- z
|
||||
'EPSG','9001',
|
||||
0.00268452, -- rx
|
||||
0.00329165, -- ry
|
||||
-0.00116569, -- rz
|
||||
'EPSG','9104',
|
||||
0.002583, -- s
|
||||
'EPSG','9202',
|
||||
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
|
||||
'NKG 2020', -- operation version
|
||||
0
|
||||
);
|
||||
|
||||
INSERT INTO "usage" VALUES (
|
||||
'NKG', '5041', -- usage auth+code
|
||||
'helmert_transformation', -- object_table_name
|
||||
'NKG','PAR_2020_NO', -- object auth+code
|
||||
'EPSG', '1352', -- extent: Norway - onshore
|
||||
'NKG', 'SCOPE_GENERIC' -- scope
|
||||
);
|
||||
|
||||
INSERT INTO "other_transformation" (
|
||||
auth_name,
|
||||
code,
|
||||
name,
|
||||
description,
|
||||
method_auth_name,
|
||||
method_code,
|
||||
method_name,
|
||||
source_crs_auth_name,
|
||||
source_crs_code,
|
||||
target_crs_auth_name,
|
||||
target_crs_code,
|
||||
accuracy,
|
||||
operation_version,
|
||||
deprecated
|
||||
)
|
||||
VALUES(
|
||||
'NKG', 'NKG_ETRF14_ETRF93_2000', -- object auth+code
|
||||
'NKG_ETRF14 to ETRF93@2000.0', -- name
|
||||
'Transformation from NKG_ETRF14 to ETRF93, at transformation reference epoch 2000.0', -- description / remark
|
||||
'PROJ', 'PROJString',
|
||||
'+proj=xyzgridshift +grids=no_kv_NKGETRF14_EPSG7922_2000.tif',
|
||||
'NKG','ETRF14', -- source auth+code
|
||||
'EPSG','7922', -- target auth+code
|
||||
0.005, -- accuracy
|
||||
'NKG 2020', -- operation_version
|
||||
0 -- deprecated
|
||||
);
|
||||
|
||||
INSERT INTO "usage" VALUES (
|
||||
'NKG', '5064',
|
||||
'other_transformation',
|
||||
'NKG', 'NKG_ETRF14_ETRF93_2000',
|
||||
'EPSG', '1352',
|
||||
'NKG', 'SCOPE_GENERIC'
|
||||
);
|
||||
|
||||
-- SE
|
||||
INSERT INTO "helmert_transformation" VALUES (
|
||||
@@ -2056,6 +2111,116 @@ INSERT INTO "supersession" VALUES (
|
||||
);
|
||||
|
||||
|
||||
-------------------------------------------------------
|
||||
-- Transformation: NKG_ETRF14 -> ETRF93@1995.0 (NO)
|
||||
-------------------------------------------------------
|
||||
|
||||
INSERT INTO "other_transformation" (
|
||||
auth_name,
|
||||
code,
|
||||
name,
|
||||
description,
|
||||
method_auth_name,
|
||||
method_code,
|
||||
method_name,
|
||||
source_crs_auth_name,
|
||||
source_crs_code,
|
||||
target_crs_auth_name,
|
||||
target_crs_code,
|
||||
accuracy,
|
||||
operation_version,
|
||||
deprecated
|
||||
)
|
||||
VALUES(
|
||||
'NKG', 'NO_2020_INTRAPLATE', -- object auth+code
|
||||
'ETRF93@2000.0 to ETRF93@1995.0', -- name
|
||||
NULL, -- description
|
||||
'PROJ', 'PROJString', -- method auth+cod
|
||||
'+proj=deformation +dt=-5 +grids=eur_nkg_nkgrf17vel.tif',
|
||||
'EPSG','7922', -- source_crs: ETRF93@2000.0
|
||||
'EPSG','4936', -- target_crs: ETRS89 (NO)
|
||||
0.005, -- accuracy
|
||||
'NKG 2020', -- operation_version
|
||||
0 -- deprecated
|
||||
);
|
||||
|
||||
INSERT INTO "usage" VALUES (
|
||||
'NKG', '5058', -- usage auth+code
|
||||
'other_transformation', -- object_table_name
|
||||
'NKG', 'NO_2020_INTRAPLATE', -- object auth+code
|
||||
'EPSG', '1352', -- extent: Norway - onshore and offshore
|
||||
'NKG', 'SCOPE_GENERIC' -- scope
|
||||
);
|
||||
|
||||
INSERT INTO "concatenated_operation" VALUES(
|
||||
'NKG', 'ETRF14_TO_NO', -- operation auth+code
|
||||
'NKG_ETRF14 to ETRS89(NO)', -- name
|
||||
'Transformation from NKG_ETRF14@2000.0 to ETRF93@1995.0', -- description
|
||||
'NKG', 'ETRF14',-- source_crs: NKG_ETRF00
|
||||
'EPSG','4936', -- target_crs: ETRS89 (NO)
|
||||
0.01, -- accuracy
|
||||
'NKG 2020', -- operation_version
|
||||
0 -- deprecated
|
||||
);
|
||||
|
||||
INSERT INTO "concatenated_operation_step" (
|
||||
operation_auth_name, operation_code, step_number, step_auth_name, step_code
|
||||
) VALUES
|
||||
('NKG', 'ETRF14_TO_NO', 1, 'NKG', 'PAR_2020_NO'),
|
||||
('NKG', 'ETRF14_TO_NO', 2, 'NKG', 'NO_2020_INTRAPLATE')
|
||||
;
|
||||
|
||||
INSERT INTO "usage" VALUES (
|
||||
'NKG', '5059', -- usage auth+code
|
||||
'concatenated_operation', -- object_table_name
|
||||
'NKG', 'ETRF14_TO_NO', -- object auth+code
|
||||
'EPSG', '1352', -- extent: Norway - onshore and offshore
|
||||
'NKG', 'SCOPE_GENERIC' -- scope auth+code
|
||||
);
|
||||
|
||||
|
||||
-------------------------------------------------------
|
||||
-- Transformation: ITRF2014 -> ETRF93@1995.0 (NO)
|
||||
-------------------------------------------------------
|
||||
|
||||
INSERT INTO "concatenated_operation" VALUES (
|
||||
'NKG', 'ITRF2014_TO_NO', -- operation auth+code
|
||||
'ITRF2014 to ETRS89(NO)', -- name
|
||||
'Time-dependent transformation from ITRF2014 to ETRS89(NO)', -- description
|
||||
'EPSG', '7789', -- source_crs: ITRF2014
|
||||
'EPSG', '4936', -- target_crs: ETRS89(NO)
|
||||
0.01, -- accuracy
|
||||
'NKG 2020', -- operation_version
|
||||
0 -- deprecated
|
||||
);
|
||||
|
||||
INSERT INTO "concatenated_operation_step" (
|
||||
operation_auth_name, operation_code, step_number, step_auth_name, step_code
|
||||
) VALUES
|
||||
('NKG', 'ITRF2014_TO_NO', 1, 'EPSG', '8366'), -- ITRF2014 -> ETRF2014
|
||||
('NKG', 'ITRF2014_TO_NO', 2, 'NKG', 'NKG_ETRF14_TO_ETRF2014'),
|
||||
('NKG', 'ITRF2014_TO_NO', 3, 'NKG', 'NKG_ETRF14_ETRF93_2000'),
|
||||
('NKG', 'ITRF2014_TO_NO', 4, 'NKG', 'NO_2020_INTRAPLATE')
|
||||
;
|
||||
|
||||
INSERT INTO "usage" VALUES (
|
||||
'NKG', '5060', -- usage auth+code
|
||||
'concatenated_operation', -- object_table_name
|
||||
'NKG', 'ITRF2014_TO_NO', -- object auth+code
|
||||
'EPSG', '1352', -- extent: Norway - onshore and offshore
|
||||
'NKG', 'SCOPE_GENERIC' -- scope auth+code
|
||||
);
|
||||
|
||||
INSERT INTO "supersession" VALUES (
|
||||
'concatenated_operation',
|
||||
'NKG', 'ITRF2000_TO_NO',
|
||||
'concatenated_operation',
|
||||
'NKG', 'ITRF2014_TO_NO',
|
||||
'NKG',
|
||||
0
|
||||
);
|
||||
|
||||
|
||||
-------------------------------------------------------
|
||||
-- Transformation: NKG_ETRF14 -> ETRF97@1999.5 (SE)
|
||||
-------------------------------------------------------
|
||||
@@ -2157,7 +2322,7 @@ INSERT INTO "usage" VALUES (
|
||||
'NKG', '5063', -- usage auth+code
|
||||
'concatenated_operation', -- object_table_name
|
||||
'NKG', 'ITRF2014_TO_SE', -- object auth+code
|
||||
'EPSG', '1352', -- extent: Sweden - onshore and offshore
|
||||
'EPSG', '1225', -- extent: Sweden - onshore and offshore
|
||||
'NKG', 'SCOPE_GENERIC' -- scope auth+code
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
-- Append NKG to authority references
|
||||
UPDATE
|
||||
authority_to_authority_preference
|
||||
SET
|
||||
allowed_authorities = allowed_authorities || ',NKG'
|
||||
WHERE
|
||||
source_auth_name = 'EPSG' AND target_auth_name = 'EPSG';
|
||||
|
||||
INSERT INTO "authority_to_authority_preference"
|
||||
(source_auth_name,target_auth_name, allowed_authorities)
|
||||
VALUES
|
||||
('NKG', 'EPSG', 'NKG,PROJ,EPSG');
|
||||
@@ -1,5 +1,21 @@
|
||||
-- This file is hand generated.
|
||||
|
||||
-- Norway triangulated files
|
||||
|
||||
INSERT INTO other_transformation VALUES(
|
||||
'PROJ','NGO48_TO_ETRS89NO','NGO 1948 to ETRS89 (2)',
|
||||
'Transformation based on a triangulated irregular network',
|
||||
'PROJ','PROJString',
|
||||
'+proj=pipeline ' ||
|
||||
'+step +proj=axisswap +order=2,1 ' ||
|
||||
'+step +proj=tinshift +file=no_kv_ETRS89NO_NGO48_TIN.json +inv ' ||
|
||||
'+step +proj=axisswap +order=2,1',
|
||||
'EPSG','4273',
|
||||
'EPSG','4258',
|
||||
0.1,
|
||||
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('PROJ','NGO48_TO_ETRS89NO_USAGE','other_transformation','PROJ','NGO48_TO_ETRS89NO','EPSG','1352','EPSG','1031');
|
||||
|
||||
-- Finland triangulated files
|
||||
|
||||
INSERT INTO other_transformation VALUES(
|
||||
|
||||
@@ -1089,7 +1089,7 @@ CREATE TABLE grid_alternatives(
|
||||
proj_grid_name TEXT NOT NULL, -- PROJ >= 7 grid name (e.g us_nga_egm08_25.tif)
|
||||
old_proj_grid_name TEXT, -- PROJ < 7 grid name (e.g egm08_25.gtx)
|
||||
proj_grid_format TEXT NOT NULL, -- 'GTiff', 'GTX', 'NTv2', JSON
|
||||
proj_method TEXT NOT NULL, -- hgridshift, vgridshift, geoid_like, geocentricoffset or tinshift
|
||||
proj_method TEXT NOT NULL, -- hgridshift, vgridshift, geoid_like, geocentricoffset, tinshift or velocity_grid
|
||||
inverse_direction BOOLEAN NOT NULL CHECK (inverse_direction IN (0, 1)), -- whether the PROJ grid direction is reversed w.r.t to the authority one (TRUE in that case)
|
||||
package_name TEXT, -- no longer used. Must be NULL
|
||||
url TEXT, -- optional URL where to download the PROJ grid
|
||||
@@ -1099,7 +1099,7 @@ CREATE TABLE grid_alternatives(
|
||||
|
||||
CONSTRAINT fk_grid_alternatives_grid_packages FOREIGN KEY (package_name) REFERENCES grid_packages(package_name),
|
||||
CONSTRAINT check_grid_alternatives_grid_fromat CHECK (proj_grid_format IN ('GTiff', 'GTX', 'NTv2', 'JSON')),
|
||||
CONSTRAINT check_grid_alternatives_proj_method CHECK (proj_method IN ('hgridshift', 'vgridshift', 'geoid_like', 'geocentricoffset', 'tinshift')),
|
||||
CONSTRAINT check_grid_alternatives_proj_method CHECK (proj_method IN ('hgridshift', 'vgridshift', 'geoid_like', 'geocentricoffset', 'tinshift', 'velocity_grid')),
|
||||
CONSTRAINT check_grid_alternatives_inverse_direction CHECK (NOT(proj_method = 'geoid_like' AND inverse_direction = 1)),
|
||||
CONSTRAINT check_grid_alternatives_package_name CHECK (package_name IS NULL),
|
||||
CONSTRAINT check_grid_alternatives_direct_download_url CHECK (NOT(direct_download IS NULL AND url IS NOT NULL)),
|
||||
|
||||
@@ -352,15 +352,15 @@ INSERT INTO "projected_crs" VALUES('EPSG','2174','Pulkovo 1942(58) / Poland zone
|
||||
INSERT INTO "usage" VALUES('EPSG','1198','projected_crs','EPSG','2174','EPSG','1518','EPSG','1142');
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2175','Pulkovo 1942(58) / Poland zone V',NULL,'EPSG','4530','EPSG','4179','EPSG','18285',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','1199','projected_crs','EPSG','2175','EPSG','1519','EPSG','1142');
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2176','ETRS89 / Poland CS2000 zone 5',NULL,'EPSG','4531','EPSG','4258','EPSG','18305',NULL,0);
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2176','ETRF2000-PL / CS2000/15',NULL,'EPSG','4531','EPSG','9702','EPSG','18305',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','1200','projected_crs','EPSG','2176','EPSG','1520','EPSG','1061');
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2177','ETRS89 / Poland CS2000 zone 6',NULL,'EPSG','4531','EPSG','4258','EPSG','18306',NULL,0);
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2177','ETRF2000-PL / CS2000/18',NULL,'EPSG','4531','EPSG','9702','EPSG','18306',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','1201','projected_crs','EPSG','2177','EPSG','1521','EPSG','1061');
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2178','ETRS89 / Poland CS2000 zone 7',NULL,'EPSG','4531','EPSG','4258','EPSG','18307',NULL,0);
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2178','ETRF2000-PL / CS2000/21',NULL,'EPSG','4531','EPSG','9702','EPSG','18307',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','1202','projected_crs','EPSG','2178','EPSG','1522','EPSG','1061');
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2179','ETRS89 / Poland CS2000 zone 8',NULL,'EPSG','4531','EPSG','4258','EPSG','18308',NULL,0);
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2179','ETRF2000-PL / CS2000/24',NULL,'EPSG','4531','EPSG','9702','EPSG','18308',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','1203','projected_crs','EPSG','2179','EPSG','1523','EPSG','1061');
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2180','ETRS89 / Poland CS92',NULL,'EPSG','4531','EPSG','4258','EPSG','18300',NULL,0);
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2180','ETRF2000-PL / CS92',NULL,'EPSG','4531','EPSG','9702','EPSG','18300',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','1204','projected_crs','EPSG','2180','EPSG','1192','EPSG','1210');
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','2188','Azores Occidental 1939 / UTM zone 25N',NULL,'EPSG','4400','EPSG','4182','EPSG','16025',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','1205','projected_crs','EPSG','2188','EPSG','1344','EPSG','1153');
|
||||
@@ -8667,7 +8667,7 @@ INSERT INTO "projected_crs" VALUES('EPSG','27593','NTF (Paris) / Sud France',NUL
|
||||
INSERT INTO "usage" VALUES('EPSG','6852','projected_crs','EPSG','27593','EPSG','1733','EPSG','1142');
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','27594','NTF (Paris) / Corse',NULL,'EPSG','4499','EPSG','4807','EPSG','18094',NULL,1);
|
||||
INSERT INTO "usage" VALUES('EPSG','6853','projected_crs','EPSG','27594','EPSG','1327','EPSG','1142');
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','27700','OSGB 1936 / British National Grid',NULL,'EPSG','4400','EPSG','4277','EPSG','19916',NULL,0);
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','27700','OSGB36 / British National Grid',NULL,'EPSG','4400','EPSG','4277','EPSG','19916',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','6854','projected_crs','EPSG','27700','EPSG','4390','EPSG','1142');
|
||||
INSERT INTO "projected_crs" VALUES('EPSG','28191','Palestine 1923 / Palestine Grid',NULL,'EPSG','4400','EPSG','4281','EPSG','18201',NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','6855','projected_crs','EPSG','28191','EPSG','1356','EPSG','1142');
|
||||
|
||||
@@ -484,6 +484,10 @@ INSERT INTO "vertical_crs" VALUES('EPSG','9458','AVWS height',NULL,'EPSG','6499'
|
||||
INSERT INTO "usage" VALUES('EPSG','14231','vertical_crs','EPSG','9458','EPSG','4177','EPSG','1264');
|
||||
INSERT INTO "vertical_crs" VALUES('EPSG','9471','INAGeoid2020 height',NULL,'EPSG','6499','EPSG','1294',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','14153','vertical_crs','EPSG','9471','EPSG','1122','EPSG','1178');
|
||||
INSERT INTO "vertical_crs" VALUES('EPSG','9650','Baltic 1986 height',NULL,'EPSG','6499','EPSG','1296',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15032','vertical_crs','EPSG','9650','EPSG','3293','EPSG','1178');
|
||||
INSERT INTO "vertical_crs" VALUES('EPSG','9651','EVRF2007-PL height',NULL,'EPSG','6499','EPSG','1297',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15034','vertical_crs','EPSG','9651','EPSG','3293','EPSG','1178');
|
||||
INSERT INTO "vertical_crs" VALUES('EPSG','9663','EH2000 height',NULL,'EPSG','6499','EPSG','1298',0);
|
||||
INSERT INTO "usage" VALUES('EPSG','14747','vertical_crs','EPSG','9663','EPSG','3246','EPSG','1178');
|
||||
INSERT INTO "vertical_crs" VALUES('EPSG','9666','LAS07 height',NULL,'EPSG','6499','EPSG','1299',0);
|
||||
|
||||
@@ -208,6 +208,10 @@ INSERT INTO "vertical_datum" VALUES('EPSG','1292','Australian Vertical Working S
|
||||
INSERT INTO "usage" VALUES('EPSG','14134','vertical_datum','EPSG','1292','EPSG','4177','EPSG','1264');
|
||||
INSERT INTO "vertical_datum" VALUES('EPSG','1294','Indonesian Geoid 2020',NULL,'2020-01-01',NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','14149','vertical_datum','EPSG','1294','EPSG','1122','EPSG','1178');
|
||||
INSERT INTO "vertical_datum" VALUES('EPSG','1296','Baltic 1986',NULL,'1986-01-01',NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','14975','vertical_datum','EPSG','1296','EPSG','3293','EPSG','1178');
|
||||
INSERT INTO "vertical_datum" VALUES('EPSG','1297','European Vertical Reference Frame 2007 Poland',NULL,'2019-01-01',NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','15033','vertical_datum','EPSG','1297','EPSG','3293','EPSG','1178');
|
||||
INSERT INTO "vertical_datum" VALUES('EPSG','1298','Estonian Height System 2000',NULL,'2005-07-01',NULL,NULL,0);
|
||||
INSERT INTO "usage" VALUES('EPSG','14743','vertical_datum','EPSG','1298','EPSG','3246','EPSG','1178');
|
||||
INSERT INTO "vertical_datum" VALUES('EPSG','1299','Lithuanian Height System 2007',NULL,'2005-07-01',NULL,NULL,0);
|
||||
|
||||
@@ -32,9 +32,10 @@ set(SQL_FILES
|
||||
"${SQL_DIR}/deprecation.sql"
|
||||
"${SQL_DIR}/esri.sql"
|
||||
"${SQL_DIR}/ignf.sql"
|
||||
"${SQL_DIR}/nkg.sql"
|
||||
"${SQL_DIR}/grid_alternatives.sql"
|
||||
"${SQL_DIR}/grid_alternatives_generated_noaa.sql"
|
||||
"${SQL_DIR}/customizations.sql"
|
||||
"${SQL_DIR}/nkg.sql"
|
||||
"${SQL_DIR}/nkg_post_customizations.sql"
|
||||
"${SQL_DIR}/commit.sql"
|
||||
)
|
||||
|
||||
@@ -32,9 +32,6 @@ html: .doxygen_up_to_date
|
||||
# Undoes the hack done in scripts/doxygen.sh
|
||||
@sed "s/io::Convention_/io::Convention/g" < $(BUILDDIR)/html/development/reference/cpp/io.html | sed "s/>Convention_/>Convention/g" | sed "s/_WKT2/WKT2/g" | sed "s/_WKT1/WKT1/g" > $(BUILDDIR)/html/development/reference/cpp/io.html.tmp
|
||||
@mv $(BUILDDIR)/html/development/reference/cpp/io.html.tmp $(BUILDDIR)/html/development/reference/cpp/io.html
|
||||
# Undoes the hacks of scripts/generate_breathe_friendly_general_doc.py
|
||||
@sed "s/<em class=\"property\">namespace <\/em>//g" < $(BUILDDIR)/html/development/reference/cpp/cpp_general.html > $(BUILDDIR)/html/development/reference/cpp/cpp_general.html.tmp
|
||||
@mv $(BUILDDIR)/html/development/reference/cpp/cpp_general.html.tmp $(BUILDDIR)/html/development/reference/cpp/cpp_general.html
|
||||
@cp -r ../schemas $(BUILDDIR)/html/schemas
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -242,13 +242,4 @@ Hence, in honour of *cct* (the geodesist) this is :program:`cct` (the program).
|
||||
|
||||
**proj(1)**, **cs2cs(1)**, **geod(1)**, **gie(1)**, **projinfo(1)**, **projsync(1)**
|
||||
|
||||
Bugs
|
||||
****
|
||||
|
||||
A list of know bugs can be found at https://github.com/OSGeo/PROJ/issues
|
||||
where new bug reports can be submitted to.
|
||||
|
||||
Home page
|
||||
*********
|
||||
|
||||
https://proj.org/
|
||||
.. include:: common_man.rst
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
.. only:: man
|
||||
|
||||
Bugs
|
||||
****
|
||||
|
||||
A list of known bugs can be found at https://github.com/OSGeo/PROJ/issues
|
||||
where new bug reports can be submitted to.
|
||||
|
||||
Home page
|
||||
*********
|
||||
|
||||
https://proj.org/
|
||||
@@ -317,13 +317,4 @@ outputs
|
||||
|
||||
**proj(1)**, **cct(1)**, **geod(1)**, **gie(1)**, **projinfo(1)**, **projsync(1)**
|
||||
|
||||
Bugs
|
||||
****
|
||||
|
||||
A list of know bugs can be found at https://github.com/OSGeo/PROJ/issues
|
||||
where new bug reports can be submitted to.
|
||||
|
||||
Home page
|
||||
*********
|
||||
|
||||
https://proj.org/
|
||||
.. include:: common_man.rst
|
||||
|
||||
@@ -60,14 +60,12 @@ The following command-line options can appear in any order:
|
||||
.. option:: -f <format>
|
||||
|
||||
Where *format* is a printf format string to control the output form of the
|
||||
geographic coordinate values. The default mode is DMS for geographic
|
||||
coordinates and ``"%.3f"`` for distance.
|
||||
geographic coordinate values. The default mode is DMS.
|
||||
|
||||
.. option:: -F <format>
|
||||
|
||||
Where *format* is a printf format string to control the output form of the distance
|
||||
value (``-F``). The default mode is DMS for geographic coordinates and
|
||||
``"%.3f"`` for distance.
|
||||
value. The default mode is ``"%.3f"``.
|
||||
|
||||
.. option:: -w<n>
|
||||
|
||||
@@ -202,13 +200,4 @@ Further reading
|
||||
|
||||
**proj(1)**, **cs2cs(1)**, **cct(1)**, **gie(1)**, **projinfo(1)**, **projsync(1)**
|
||||
|
||||
Bugs
|
||||
****
|
||||
|
||||
A list of know bugs can be found at https://github.com/OSGeo/PROJ/issues
|
||||
where new bug reports can be submitted to.
|
||||
|
||||
Home page
|
||||
*********
|
||||
|
||||
https://proj.org/
|
||||
.. include:: common_man.rst
|
||||
|
||||
@@ -395,13 +395,4 @@ So in honour, and hopefully also in the spirit, of Gerald Ian Evenden
|
||||
|
||||
**proj(1)**, **cs2cs(1)**, **cct(1)**, **geod(1)**, **projinfo(1)**, **projsync(1)**
|
||||
|
||||
Bugs
|
||||
****
|
||||
|
||||
A list of know bugs can be found at https://github.com/OSGeo/PROJ/issues
|
||||
where new bug reports can be submitted to.
|
||||
|
||||
Home page
|
||||
*********
|
||||
|
||||
https://proj.org/
|
||||
.. include:: common_man.rst
|
||||
|
||||
@@ -216,13 +216,4 @@ data will appear as three lines of::
|
||||
|
||||
**cs2cs(1)**, **cct(1)**, **geod(1)**, **gie(1)**, **projinfo(1)**, **projsync(1)**
|
||||
|
||||
Bugs
|
||||
****
|
||||
|
||||
A list of know bugs can be found at https://github.com/OSGeo/PROJ/issues
|
||||
where new bug reports can be submitted to.
|
||||
|
||||
Home page
|
||||
*********
|
||||
|
||||
https://proj.org/
|
||||
.. include:: common_man.rst
|
||||
|
||||
@@ -450,13 +450,4 @@ Output:
|
||||
|
||||
**cs2cs(1)**, **cct(1)**, **geod(1)**, **gie(1)**, **proj(1)**, **projsync(1)**
|
||||
|
||||
Bugs
|
||||
****
|
||||
|
||||
A list of know bugs can be found at https://github.com/OSGeo/PROJ/issues
|
||||
where new bug reports can be submitted to.
|
||||
|
||||
Home page
|
||||
*********
|
||||
|
||||
https://proj.org/
|
||||
.. include:: common_man.rst
|
||||
|
||||
@@ -149,7 +149,7 @@ Examples
|
||||
Bugs
|
||||
****
|
||||
|
||||
A list of know bugs can be found at https://github.com/OSGeo/PROJ/issues
|
||||
A list of known bugs can be found at https://github.com/OSGeo/PROJ/issues
|
||||
where new bug reports can be submitted to.
|
||||
Bugs specific to resource files should be submitted to
|
||||
https://github.com/OSGeo/PROJ-data/issues
|
||||
|
||||
@@ -20,13 +20,13 @@ contributor the community is always very welcoming.
|
||||
Conference
|
||||
----------
|
||||
|
||||
.. image:: ../../images/foss4g2020.png
|
||||
:alt: FOSS4G 2020
|
||||
:target: https://2020.foss4g.org/
|
||||
.. image:: ../../images/foss4g2021.jpg
|
||||
:alt: FOSS4G 2021
|
||||
:target: https://2021.foss4g.org/
|
||||
|
||||
`FOSS4G 2020 <https://2020.foss4g.org/>`_ is the leading annual conference for
|
||||
`FOSS4G 2021 <https://2021.foss4g.org/>`_ is the leading annual conference for
|
||||
free and open source geospatial software. It will include presentations related
|
||||
to PROJ, and some of the PROJ development community will be attending. It is the
|
||||
event for those interested in PROJ, other FOSS geospatial technologies and the
|
||||
community around them. The conference will be held in Calgary, Canada,
|
||||
August 24th - August 29th, 2020.
|
||||
community around them. The conference will due to COVID-19 be held in a virtual
|
||||
setting September 27th - October 2nd, 2021.
|
||||
|
||||
@@ -546,7 +546,7 @@ Strong points:
|
||||
|
||||
* TIFF can be tiled.
|
||||
|
||||
* TIFF can be compressed. Commonly found compression formats arre DEFLATE, LZW,
|
||||
* TIFF can be compressed. Commonly found compression formats are DEFLATE, LZW,
|
||||
combined with differential integer or floating point predictors
|
||||
|
||||
* A TIFF image can contain a configurable number of channels/bands/samples.
|
||||
|
||||
+4
-1
@@ -43,6 +43,9 @@ extensions = [
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# BibTeX configuration
|
||||
bibtex_bibfiles = ['references.bib']
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
# source_suffix = ['.rst', '.md']
|
||||
@@ -194,7 +197,7 @@ html_context = {
|
||||
'github_user': 'OSGeo',
|
||||
'github_repo': 'PROJ',
|
||||
# TODO: edit when switching active branch
|
||||
'github_version': '/7.2/docs/source/',
|
||||
'github_version': '/8.0/docs/source/',
|
||||
'css_files': [
|
||||
'_static/theme_overrides.css', # override wide tables in RTD theme
|
||||
],
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
General documentation
|
||||
---------------------
|
||||
|
||||
.. doxygenfile:: general_doc.dox.reworked.h
|
||||
.. doxygenpage:: general_doc
|
||||
:project: doxygen_api
|
||||
|
||||
@@ -829,7 +829,7 @@ Errors in class PROJ_ERR_INVALID_OP
|
||||
|
||||
.. note:: some of them can also be emitted during coordinate transformation,
|
||||
like PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID in case the resource loading
|
||||
is differed until it is really needed.
|
||||
is deferred until it is really needed.
|
||||
|
||||
.. c:macro:: PROJ_ERR_INVALID_OP_WRONG_SYNTAX
|
||||
|
||||
|
||||
@@ -623,7 +623,13 @@ Distances
|
||||
Calculate geodesic distance between two points in geodetic coordinates. The
|
||||
calculated distance is between the two points located on the ellipsoid.
|
||||
|
||||
:param P: Transformation object
|
||||
The coordinates in :c:data:`a` and :c:data:`b` needs to be given as longitude
|
||||
and latitude in radians. Note that the axis order of the :c:data:`P` object
|
||||
is not taken into account in this function, so even though a CRS object comes
|
||||
with axis ordering latitude/longitude coordinates used in this function should
|
||||
be reordered as longitude/latitude.
|
||||
|
||||
:param P: Transformation or CRS object
|
||||
:type P: const :c:type:`PJ` *
|
||||
:param PJ_COORD a: Coordinate of first point
|
||||
:param PJ_COORD b: Coordinate of second point
|
||||
@@ -635,7 +641,13 @@ Distances
|
||||
Similar to :c:func:`proj_lp_dist` but also takes the height above the ellipsoid
|
||||
into account.
|
||||
|
||||
:param P: Transformation object
|
||||
The coordinates in :c:data:`a` and :c:data:`b` needs to be given as longitude
|
||||
and latitude in radians. Note that the axis order of the :c:data:`P` object
|
||||
is not taken into account in this function, so even though a CRS object comes
|
||||
with axis ordering latitude/longitude coordinates used in this function should
|
||||
be reordered as longitude/latitude.
|
||||
|
||||
:param P: Transformation or CRS object
|
||||
:type P: const :c:type:`PJ` *
|
||||
:param PJ_COORD a: Coordinate of first point
|
||||
:param PJ_COORD b: Coordinate of second point
|
||||
@@ -657,6 +669,27 @@ Distances
|
||||
:param PJ_COORD b: Second coordinate
|
||||
:returns: `double` Distance between :c:data:`a` and :c:data:`b` in meters.
|
||||
|
||||
.. c:function:: PJ_COORD proj_geod(const PJ *P, PJ_COORD a, PJ_COORD b)
|
||||
|
||||
Calculate the geodesic distance as well as forward and reverse azimuth
|
||||
between two points on the ellipsoid.
|
||||
|
||||
The coordinates in :c:data:`a` and :c:data:`b` needs to be given as longitude
|
||||
and latitude in radians. Note that the axis order of the :c:data:`P` object
|
||||
is not taken into account in this function, so even though a CRS object comes
|
||||
with axis ordering latitude/longitude coordinates used in this function should
|
||||
be reordered as longitude/latitude.
|
||||
|
||||
:param P: Transformation or CRS object
|
||||
:type P: const :c:type:`PJ` *
|
||||
:param PJ_COORD a: Coordinate of first point
|
||||
:param PJ_COORD b: Coordinate of second point
|
||||
:returns: `PJ_COORD` where the first value is the distance between :c:data:`a`
|
||||
and :c:data:`b` in meters, the second value is the forward azimuth
|
||||
and the thir value is the reverse azimuth. The fourth coordinate
|
||||
value is unused.
|
||||
|
||||
|
||||
|
||||
Various
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
@@ -7,6 +7,7 @@ Reference
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
macros
|
||||
datatypes
|
||||
functions
|
||||
cpp/index.rst
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
.. _macros:
|
||||
|
||||
================================================================================
|
||||
Macros
|
||||
================================================================================
|
||||
|
||||
.. c:macro:: PROJ_VERSION_MAJOR
|
||||
|
||||
Major version number, e.g 8 for PROJ 8.0.1
|
||||
|
||||
.. c:macro:: PROJ_VERSION_MINOR
|
||||
|
||||
Minor version number, e.g 0 for PROJ 8.0.1
|
||||
|
||||
.. c:macro:: PROJ_VERSION_PATCH
|
||||
|
||||
Patch version number, e.g 1 for PROJ 8.0.1
|
||||
|
||||
.. c:macro:: PROJ_COMPUTE_VERSION(maj,min,patch)
|
||||
|
||||
.. versionadded:: 8.0.1
|
||||
|
||||
Compute the version number from the major, minor and patch numbers.
|
||||
|
||||
.. c:macro:: PROJ_VERSION_NUMBER
|
||||
|
||||
.. versionadded:: 8.0.1
|
||||
|
||||
Total version number, equal to
|
||||
``PROJ_COMPUTE_VERSION(PROJ_VERSION_MAJOR, PROJ_VERSION_MINOR, PROJ_VERSION_PATCH)``
|
||||
|
||||
.. c:macro:: PROJ_AT_LEAST_VERSION(maj,min,patch)
|
||||
|
||||
.. versionadded:: 8.0.1
|
||||
|
||||
Macro that returns true if the current PROJ version is at least the version
|
||||
specified by (maj,min,patch)
|
||||
|
||||
Equivalent to ``PROJ_VERSION_NUMBER >= PROJ_COMPUTE_VERSION(maj,min,patch)``
|
||||
@@ -221,7 +221,7 @@ Bug fixes
|
||||
Updates
|
||||
-------
|
||||
|
||||
* Added various Brazillian grids to the database (`#2277 <https://github.com/OSGeo/PROJ/issues/2277>`_)
|
||||
* Added various Brazilian grids to the database (`#2277 <https://github.com/OSGeo/PROJ/issues/2277>`_)
|
||||
|
||||
* Added geoid file for Canary Islands to the database (`#2312 <https://github.com/OSGeo/PROJ/issues/2312>`_)
|
||||
|
||||
@@ -790,7 +790,7 @@ Bug fixes
|
||||
* Database: add an auxiliary concatenated_operation_step table to allow
|
||||
arbitrary number of steps (`#1696 <https://github.com/OSGeo/PROJ/issues/1696>`_)
|
||||
|
||||
* Fix errors running gie-based tests in Debug mode on Windo (`#1688 <https://github.com/OSGeo/PROJ/issues/1688>`_)
|
||||
* Fix errors running gie-based tests in Debug mode on Window (`#1688 <https://github.com/OSGeo/PROJ/issues/1688>`_)
|
||||
|
||||
6.2.1 Release Notes
|
||||
++++++++++++++++++++++++++++++++++++++++
|
||||
@@ -1089,7 +1089,7 @@ UPDATES
|
||||
by adding ``+approx``
|
||||
(`#404 <https://github.com/OSGeo/proj.4/issues/404>`_)
|
||||
|
||||
* Chaged behavior: Default ellipsoid now set to GRS80 (was WGS84) (`#1210 <https://github.com/OSGeo/proj.4/issues/1210>`_)
|
||||
* Changed behavior: Default ellipsoid now set to GRS80 (was WGS84) (`#1210 <https://github.com/OSGeo/proj.4/issues/1210>`_)
|
||||
|
||||
* Allow multiple directories in :envvar:`PROJ_LIB` environment variable (`#1281 <https://github.com/OSGeo/proj.4/issues/1281>`_)
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ However, the parameters below can be used in a declarative manner when used with
|
||||
|
||||
.. option:: +datum=<value>
|
||||
|
||||
Declare the datum used with the coordinates. See ``cs2cs -l`` for a
|
||||
Declare the datum used with the coordinates. See ``cs2cs -ld`` for a
|
||||
list of available datums.
|
||||
|
||||
.. option:: +towgs84=<list>
|
||||
|
||||
@@ -480,7 +480,7 @@ conversions between geographic and geocentric CRS to have a consistent concatena
|
||||
operation, like the following:
|
||||
1. GDA94 to GDA2020 (1): from EPSG
|
||||
2. Conversion from GDA2020 (geog2D) to GDA2020 (geocentric): synthetized by PROJ
|
||||
3. GDA2020 to WGS 84 (G1762) (1): frmo EPSG
|
||||
3. GDA2020 to WGS 84 (G1762) (1): from EPSG
|
||||
4. Conversion from WGS 84 (G1762) (geocentric) to WGS 84 (G1762) (geog2D): synthetized by PROJ
|
||||
|
||||
Projected CRS to any target CRS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. option:: +R=<value>
|
||||
|
||||
Radius of the sphere given in meters. If used in conjunction with ``+ellps``
|
||||
Radius of the sphere given in meters. If used in conjunction with ``+ellps``,
|
||||
``+R`` takes precedence.
|
||||
|
||||
@@ -36,10 +36,6 @@ Options
|
||||
Use Guam ellipsoidal formulas. Only accurate near the Island of Guam
|
||||
(:math:`\lambda\approx 144.5^{\circ}`, :math:`\phi\approx 13.5^{\circ}`)
|
||||
|
||||
.. include:: ../options/k_0.rst
|
||||
|
||||
.. include:: ../options/lat_ts.rst
|
||||
|
||||
.. include:: ../options/lat_0.rst
|
||||
|
||||
.. include:: ../options/lon_0.rst
|
||||
|
||||
@@ -37,7 +37,7 @@ to which specific parameters, such as central meridians, have been applied.
|
||||
The Earth is divided into 60 zones each generally 6° wide in longitude.
|
||||
Bounding meridians are evenly divisible by 6°, and zones are
|
||||
numbered from 1 to 60 proceeding east from the 180th meridian from Greenwich
|
||||
with minor exceptions [Snyder1987]_.
|
||||
with minor exceptions :cite:`Snyder1987`.
|
||||
|
||||
Usage
|
||||
#####
|
||||
|
||||
@@ -64,7 +64,7 @@ Parameters
|
||||
Mathematical definition
|
||||
#######################
|
||||
|
||||
The formulas describing the Mercator projection are all taken from G. Evenden's libproj manuals [Evenden2005]_.
|
||||
The formulas describing the Mercator projection are all taken from G. Evenden's libproj manuals :cite:`Evenden2005`.
|
||||
|
||||
Forward projection
|
||||
==================
|
||||
|
||||
@@ -151,12 +151,12 @@ is an easy way to inspect such grid files:
|
||||
- The `ImageDescription <https://www.awaresystems.be/imaging/tiff/tifftags/imagedescription.html>`_
|
||||
tag may be used to convey extra information about the name, provenance, version
|
||||
and last updated date of the grid.
|
||||
Will be set when possible fo files hosted on the CDN.
|
||||
Will be set when possible for files hosted on the CDN.
|
||||
Ignored by PROJ.
|
||||
|
||||
- The `Copyright <https://www.awaresystems.be/imaging/tiff/tifftags/copyright.html>`_
|
||||
tag may be used to convey extra information about the copyright and license of the grid.
|
||||
Will be set when possible fo files hosted on the CDN.
|
||||
Will be set when possible for files hosted on the CDN.
|
||||
Ignored by PROJ.
|
||||
|
||||
- The `DateTime <https://www.awaresystems.be/imaging/tiff/tifftags/datetime.html>`_
|
||||
@@ -164,7 +164,7 @@ is an easy way to inspect such grid files:
|
||||
converted. In case of a file conversion, for example from NTv2, this will be
|
||||
the date at which the conversion has been performed. The ``ImageDescription``
|
||||
tag however will contain the latest of the CREATED or UPDATED fields from the NTv2 file.
|
||||
Will be set when possible fo files hosted on the CDN.
|
||||
Will be set when possible for files hosted on the CDN.
|
||||
Ignored by PROJ.
|
||||
|
||||
- Files hosted on the CDN will use the `GDAL_NODATA
|
||||
|
||||
@@ -344,8 +344,9 @@ class PROJ_GCC_DLL IdentifiedObject : public util::BaseObject,
|
||||
const io::DatabaseContextPtr &dbContext = nullptr) const override;
|
||||
|
||||
PROJ_INTERNAL bool _isEquivalentTo(
|
||||
const IdentifiedObject *other, util::IComparable::Criterion criterion =
|
||||
util::IComparable::Criterion::STRICT,
|
||||
const IdentifiedObject *other,
|
||||
util::IComparable::Criterion criterion =
|
||||
util::IComparable::Criterion::STRICT,
|
||||
const io::DatabaseContextPtr &dbContext = nullptr) PROJ_PURE_DECL;
|
||||
//! @endcond
|
||||
|
||||
|
||||
@@ -583,18 +583,18 @@ class PROJ_GCC_DLL SingleOperation : virtual public CoordinateOperation {
|
||||
PROJ_DLL const OperationMethodNNPtr &method() PROJ_PURE_DECL;
|
||||
|
||||
PROJ_DLL const ParameterValuePtr &
|
||||
parameterValue(const std::string ¶mName, int epsg_code = 0) const
|
||||
noexcept;
|
||||
parameterValue(const std::string ¶mName,
|
||||
int epsg_code = 0) const noexcept;
|
||||
|
||||
PROJ_DLL const ParameterValuePtr ¶meterValue(int epsg_code) const
|
||||
noexcept;
|
||||
PROJ_DLL const ParameterValuePtr &
|
||||
parameterValue(int epsg_code) const noexcept;
|
||||
|
||||
PROJ_DLL const common::Measure &
|
||||
parameterValueMeasure(const std::string ¶mName, int epsg_code = 0) const
|
||||
noexcept;
|
||||
parameterValueMeasure(const std::string ¶mName,
|
||||
int epsg_code = 0) const noexcept;
|
||||
|
||||
PROJ_DLL const common::Measure ¶meterValueMeasure(int epsg_code) const
|
||||
noexcept;
|
||||
PROJ_DLL const common::Measure &
|
||||
parameterValueMeasure(int epsg_code) const noexcept;
|
||||
|
||||
PROJ_DLL static SingleOperationNNPtr createPROJBased(
|
||||
const util::PropertyMap &properties, const std::string &PROJString,
|
||||
@@ -612,17 +612,16 @@ class PROJ_GCC_DLL SingleOperation : virtual public CoordinateOperation {
|
||||
//! @cond Doxygen_Suppress
|
||||
|
||||
PROJ_DLL double
|
||||
parameterValueNumeric(int epsg_code,
|
||||
const common::UnitOfMeasure &targetUnit) const
|
||||
noexcept;
|
||||
parameterValueNumeric(
|
||||
int epsg_code,
|
||||
const common::UnitOfMeasure &targetUnit) const noexcept;
|
||||
|
||||
PROJ_INTERNAL double parameterValueNumeric(
|
||||
const char *param_name,
|
||||
const common::UnitOfMeasure &targetUnit) const noexcept;
|
||||
|
||||
PROJ_INTERNAL double
|
||||
parameterValueNumeric(const char *param_name,
|
||||
const common::UnitOfMeasure &targetUnit) const
|
||||
noexcept;
|
||||
|
||||
PROJ_INTERNAL double parameterValueNumericAsSI(int epsg_code) const
|
||||
noexcept;
|
||||
parameterValueNumericAsSI(int epsg_code) const noexcept;
|
||||
|
||||
PROJ_INTERNAL bool _isEquivalentTo(
|
||||
const util::IComparable *other,
|
||||
@@ -1828,9 +1827,9 @@ class PROJ_GCC_DLL CoordinateOperationContext {
|
||||
IGNORE_GRID_AVAILABILITY,
|
||||
|
||||
/** Results will be presented as if grids known to PROJ (that is
|
||||
* registered in the grid_alternatives table of its database) were
|
||||
* available. Used typically when networking is enabled.
|
||||
*/
|
||||
* registered in the grid_alternatives table of its database) were
|
||||
* available. Used typically when networking is enabled.
|
||||
*/
|
||||
KNOWN_AVAILABLE,
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -711,8 +711,8 @@ class PROJ_GCC_DLL WKTNode {
|
||||
PROJ_DLL void addChild(WKTNodeNNPtr &&child);
|
||||
PROJ_DLL const WKTNodePtr &lookForChild(const std::string &childName,
|
||||
int occurrence = 0) const noexcept;
|
||||
PROJ_DLL int countChildrenOfName(const std::string &childName) const
|
||||
noexcept;
|
||||
PROJ_DLL int
|
||||
countChildrenOfName(const std::string &childName) const noexcept;
|
||||
|
||||
PROJ_DLL std::string toString() const;
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ NS_PROJ_START
|
||||
namespace io {
|
||||
class DatabaseContext;
|
||||
using DatabaseContextPtr = std::shared_ptr<DatabaseContext>;
|
||||
}
|
||||
} // namespace io
|
||||
//! @endcond
|
||||
|
||||
/** osgeo.proj.util namespace.
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "CCT" "1" "Mar 1, 2021" "8.0.0" "PROJ"
|
||||
.TH "CCT" "1" "Mar 5, 2021" "8.0.1" "PROJ"
|
||||
.SH NAME
|
||||
cct \- Coordinate Conversion and Transformation
|
||||
.
|
||||
@@ -354,7 +354,7 @@ Hence, in honour of \fIcct\fP (the geodesist) this is \fBcct\fP (the program).
|
||||
\fBproj(1)\fP, \fBcs2cs(1)\fP, \fBgeod(1)\fP, \fBgie(1)\fP, \fBprojinfo(1)\fP, \fBprojsync(1)\fP
|
||||
.SH BUGS
|
||||
.sp
|
||||
A list of know bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
A list of known bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
where new bug reports can be submitted to.
|
||||
.SH HOME PAGE
|
||||
.sp
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "CS2CS" "1" "Mar 1, 2021" "8.0.0" "PROJ"
|
||||
.TH "CS2CS" "1" "Mar 5, 2021" "8.0.1" "PROJ"
|
||||
.SH NAME
|
||||
cs2cs \- Cartographic coordinate system filter
|
||||
.
|
||||
@@ -398,7 +398,7 @@ outputs
|
||||
\fBproj(1)\fP, \fBcct(1)\fP, \fBgeod(1)\fP, \fBgie(1)\fP, \fBprojinfo(1)\fP, \fBprojsync(1)\fP
|
||||
.SH BUGS
|
||||
.sp
|
||||
A list of know bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
A list of known bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
where new bug reports can be submitted to.
|
||||
.SH HOME PAGE
|
||||
.sp
|
||||
|
||||
+4
-6
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "GEOD" "1" "Mar 1, 2021" "8.0.0" "PROJ"
|
||||
.TH "GEOD" "1" "Mar 5, 2021" "8.0.1" "PROJ"
|
||||
.SH NAME
|
||||
geod \- Geodesic computations
|
||||
.
|
||||
@@ -86,15 +86,13 @@ option.
|
||||
.TP
|
||||
.B \-f <format>
|
||||
Where \fIformat\fP is a printf format string to control the output form of the
|
||||
geographic coordinate values. The default mode is DMS for geographic
|
||||
coordinates and \fB"%.3f"\fP for distance.
|
||||
geographic coordinate values. The default mode is DMS.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-F <format>
|
||||
Where \fIformat\fP is a printf format string to control the output form of the distance
|
||||
value (\fB\-F\fP). The default mode is DMS for geographic coordinates and
|
||||
\fB"%.3f"\fP for distance.
|
||||
value. The default mode is \fB"%.3f"\fP\&.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
@@ -249,7 +247,7 @@ C. F. F. Karney, \fI\%Algorithms for Geodesics\fP, J. Geodesy \fB87\fP(1), 43–
|
||||
\fBproj(1)\fP, \fBcs2cs(1)\fP, \fBcct(1)\fP, \fBgie(1)\fP, \fBprojinfo(1)\fP, \fBprojsync(1)\fP
|
||||
.SH BUGS
|
||||
.sp
|
||||
A list of know bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
A list of known bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
where new bug reports can be submitted to.
|
||||
.SH HOME PAGE
|
||||
.sp
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "GIE" "1" "Mar 1, 2021" "8.0.0" "PROJ"
|
||||
.TH "GIE" "1" "Mar 5, 2021" "8.0.1" "PROJ"
|
||||
.SH NAME
|
||||
gie \- The Geospatial Integrity Investigation Environment
|
||||
.
|
||||
@@ -511,7 +511,7 @@ So in honour, and hopefully also in the spirit, of Gerald Ian Evenden
|
||||
\fBproj(1)\fP, \fBcs2cs(1)\fP, \fBcct(1)\fP, \fBgeod(1)\fP, \fBprojinfo(1)\fP, \fBprojsync(1)\fP
|
||||
.SH BUGS
|
||||
.sp
|
||||
A list of know bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
A list of known bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
where new bug reports can be submitted to.
|
||||
.SH HOME PAGE
|
||||
.sp
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "PROJ" "1" "Mar 1, 2021" "8.0.0" "PROJ"
|
||||
.TH "PROJ" "1" "Mar 5, 2021" "8.0.1" "PROJ"
|
||||
.SH NAME
|
||||
proj \- Cartographic projection filter
|
||||
.
|
||||
@@ -258,7 +258,7 @@ support for datum translation.
|
||||
\fBcs2cs(1)\fP, \fBcct(1)\fP, \fBgeod(1)\fP, \fBgie(1)\fP, \fBprojinfo(1)\fP, \fBprojsync(1)\fP
|
||||
.SH BUGS
|
||||
.sp
|
||||
A list of know bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
A list of known bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
where new bug reports can be submitted to.
|
||||
.SH HOME PAGE
|
||||
.sp
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "PROJINFO" "1" "Mar 1, 2021" "8.0.0" "PROJ"
|
||||
.TH "PROJINFO" "1" "Mar 5, 2021" "8.0.1" "PROJ"
|
||||
.SH NAME
|
||||
projinfo \- Geodetic object and coordinate operation queries
|
||||
.
|
||||
@@ -609,7 +609,7 @@ Output:
|
||||
\fBcs2cs(1)\fP, \fBcct(1)\fP, \fBgeod(1)\fP, \fBgie(1)\fP, \fBproj(1)\fP, \fBprojsync(1)\fP
|
||||
.SH BUGS
|
||||
.sp
|
||||
A list of know bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
A list of known bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
where new bug reports can be submitted to.
|
||||
.SH HOME PAGE
|
||||
.sp
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "PROJSYNC" "1" "Mar 1, 2021" "8.0.0" "PROJ"
|
||||
.TH "PROJSYNC" "1" "Mar 5, 2021" "8.0.1" "PROJ"
|
||||
.SH NAME
|
||||
projsync \- Downloading tool of resource files
|
||||
.
|
||||
@@ -191,7 +191,7 @@ projsync \-\-source\-id fr_ign \-\-bbox 2,49,2,49
|
||||
\fBcs2cs(1)\fP, \fBcct(1)\fP, \fBgeod(1)\fP, \fBgie(1)\fP, \fBproj(1)\fP, \fBprojinfo(1)\fP
|
||||
.SH BUGS
|
||||
.sp
|
||||
A list of know bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
A list of known bugs can be found at \fI\%https://github.com/OSGeo/PROJ/issues\fP
|
||||
where new bug reports can be submitted to.
|
||||
Bugs specific to resource files should be submitted to
|
||||
\fI\%https://github.com/OSGeo/PROJ\-data/issues\fP
|
||||
|
||||
+31
-3
@@ -29,6 +29,7 @@
|
||||
###############################################################################
|
||||
|
||||
import os
|
||||
import re
|
||||
import sqlite3
|
||||
import sys
|
||||
|
||||
@@ -166,6 +167,12 @@ def compute_publication_date(datum_code, datum_name, frame_reference_epoch, publ
|
||||
publication_date += '-01-01'
|
||||
elif len(publication_date) == 7:
|
||||
publication_date += '-01'
|
||||
elif len(publication_date) == 4+1+4:
|
||||
m = re.search('([0-9]{4})-([0-9]{4})', publication_date)
|
||||
if m:
|
||||
publication_date = m.group(1)
|
||||
else:
|
||||
assert False, (datum_code, datum_name, publication_date)
|
||||
else:
|
||||
assert len(publication_date) == 10, (datum_code, datum_name, publication_date)
|
||||
else:
|
||||
@@ -226,13 +233,30 @@ def fill_datumensemble(proj_db_cursor):
|
||||
proj_db_cursor.execute(
|
||||
"INSERT INTO " + datum_ensemble_member_table + " (ensemble_auth_name, ensemble_code, member_auth_name, member_code, sequence) VALUES (?, ?, ?, ?, ?)", (EPSG_AUTHORITY, datum_code, EPSG_AUTHORITY, member_code, sequence))
|
||||
|
||||
handled_coord_sys_type = "('Cartesian', 'vertical', 'ellipsoidal', 'spherical', 'ordinal')"
|
||||
|
||||
def fill_coordinate_system(proj_db_cursor):
|
||||
proj_db_cursor.execute(
|
||||
"INSERT INTO coordinate_system SELECT ?, coord_sys_code, coord_sys_type, dimension FROM epsg.epsg_coordinatesystem", (EPSG_AUTHORITY,))
|
||||
"INSERT INTO coordinate_system SELECT ?, coord_sys_code, coord_sys_type, dimension FROM epsg.epsg_coordinatesystem WHERE coord_sys_type IN " + handled_coord_sys_type, (EPSG_AUTHORITY,))
|
||||
proj_db_cursor.execute("SELECT coord_sys_name, coord_sys_code, coord_sys_type, dimension FROM epsg.epsg_coordinatesystem WHERE coord_sys_type NOT IN " + handled_coord_sys_type)
|
||||
res = proj_db_cursor.fetchall()
|
||||
for row in res:
|
||||
print('Skipping coordinate system %s' % str(row))
|
||||
|
||||
|
||||
def fill_axis(proj_db_cursor):
|
||||
proj_db_cursor.execute("INSERT INTO axis SELECT ?, coord_axis_code, coord_axis_name, coord_axis_abbreviation, coord_axis_orientation, ?, coord_sys_code, coord_axis_order, CASE WHEN uom_code IS NULL THEN NULL ELSE ? END, uom_code FROM epsg.epsg_coordinateaxis ca LEFT JOIN epsg.epsg_coordinateaxisname can ON ca.coord_axis_name_code = can.coord_axis_name_code", (EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY))
|
||||
proj_db_cursor.execute(
|
||||
"INSERT INTO axis "
|
||||
"SELECT ?, coord_axis_code, coord_axis_name, coord_axis_abbreviation, "
|
||||
"coord_axis_orientation, ?, ca.coord_sys_code, coord_axis_order, "
|
||||
"CASE WHEN uom_code IS NULL THEN NULL ELSE ? END, uom_code "
|
||||
"FROM epsg.epsg_coordinateaxis ca "
|
||||
"LEFT JOIN epsg.epsg_coordinateaxisname can "
|
||||
"ON ca.coord_axis_name_code = can.coord_axis_name_code "
|
||||
"JOIN epsg.epsg_coordinatesystem cs "
|
||||
"ON cs.coord_sys_code = ca.coord_sys_code "
|
||||
"WHERE coord_sys_type IN " + handled_coord_sys_type,
|
||||
(EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY))
|
||||
|
||||
|
||||
def fill_geodetic_crs(proj_db_cursor):
|
||||
@@ -549,6 +573,8 @@ def fill_grid_transformation(proj_db_cursor):
|
||||
grid2_param_code = param_code[1]
|
||||
grid2_param_name = param_name[1]
|
||||
grid2_value = param_value[1]
|
||||
# NOTE: update src/iso19111/operation/transformation.cpp if adding
|
||||
# new methods
|
||||
# 1071: Vertical Offset by Grid Interpolation (NZLVD)
|
||||
# 1080: Vertical Offset by Grid Interpolation (BEV AT)
|
||||
# 1081: Geographic3D to GravityRelatedHeight (BEV AT)
|
||||
@@ -566,8 +592,10 @@ def fill_grid_transformation(proj_db_cursor):
|
||||
# 1096: Geog3D to Geog2D+GravityRelatedHeight (OSGM15-Ire)
|
||||
# 1097: Geog3D to Geog2D+GravityRelatedHeight (OSGM-GB)
|
||||
# 1098: Geog3D to Geog2D+GravityRelatedHeight (SA 2010)
|
||||
# 1100: Geog3D to Geog2D+GravityRelatedHeight (PL txt)
|
||||
# 1101: Vertical Offset by Grid Interpolation (PL txt)
|
||||
# 1103: Geog3D to Geog2D+GravityRelatedHeight (EGM)
|
||||
elif method_code in (1071, 1080, 1081, 1083, 1084, 1085, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1103) and n_params == 2:
|
||||
elif method_code in (1071, 1080, 1081, 1083, 1084, 1085, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1100, 1101, 1103) and n_params == 2:
|
||||
assert param_code[1] == 1048, (code, method_code, param_code[1])
|
||||
interpolation_crs_auth_name = EPSG_AUTHORITY
|
||||
interpolation_crs_code = str(int(param_value[1])) # needed to avoid codes like XXXX.0
|
||||
|
||||
@@ -1045,6 +1045,38 @@ def import_projcs():
|
||||
sql = """INSERT INTO "usage" VALUES('ESRI', 'PCRS_%s_USAGE','projected_crs','ESRI','%s','%s','%s','%s','%s');""" % (code, code, extent_auth_name, extent_code, 'EPSG', '1024')
|
||||
all_sql.append(sql)
|
||||
|
||||
elif method == 'Equal_Earth':
|
||||
assert len(parsed_conv_wkt) == 1 + 3 + 2
|
||||
False_Easting = parsed_conv_wkt['False_Easting']
|
||||
False_Northing = parsed_conv_wkt['False_Northing']
|
||||
Central_Meridian = parsed_conv_wkt['Central_Meridian']
|
||||
|
||||
cs_auth_name, cs_code, uom_code = get_cs(parsed_conv_wkt)
|
||||
|
||||
conv_name = 'unnamed'
|
||||
conv_auth_name = 'ESRI'
|
||||
conv_code = code
|
||||
|
||||
sql = """INSERT INTO "conversion" VALUES('ESRI','%s','%s',NULL,'EPSG','1078','Equal Earth','EPSG','8802','Longitude of natural origin',%s,'EPSG','%s','EPSG','8806','False easting',%s,'EPSG','%s','EPSG','8807','False northing',%s,'EPSG','%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,%d);""" % (
|
||||
code, conv_name, Central_Meridian, ang_uom_code, False_Easting, uom_code, False_Northing, uom_code, deprecated)
|
||||
|
||||
sql_extract = sql[sql.find('NULL'):]
|
||||
if conv_name != 'unnamed' or sql_extract not in map_conversion_sql_to_code:
|
||||
all_sql.append(sql)
|
||||
|
||||
sql = """INSERT INTO "usage" VALUES('ESRI', 'CONV_%s_USAGE','conversion','ESRI','%s','%s','%s','%s','%s');""" % (code, code, extent_auth_name, extent_code, 'EPSG', '1024')
|
||||
all_sql.append(sql)
|
||||
|
||||
map_conversion_sql_to_code[sql_extract] = conv_code
|
||||
else:
|
||||
conv_code = map_conversion_sql_to_code[sql_extract]
|
||||
|
||||
sql = """INSERT INTO "projected_crs" VALUES('ESRI','%s','%s',NULL,'%s','%s','%s','%s','%s','%s',NULL,%d);""" % (
|
||||
code, esri_name, cs_auth_name, cs_code, geogcs_auth_name, geogcs_code, conv_auth_name, conv_code, deprecated)
|
||||
all_sql.append(sql)
|
||||
sql = """INSERT INTO "usage" VALUES('ESRI', 'PCRS_%s_USAGE','projected_crs','ESRI','%s','%s','%s','%s','%s');""" % (code, code, extent_auth_name, extent_code, 'EPSG', '1024')
|
||||
all_sql.append(sql)
|
||||
|
||||
else:
|
||||
|
||||
sql = """INSERT INTO "projected_crs" VALUES('ESRI','%s','%s',NULL,NULL,NULL,'%s','%s',NULL,NULL,'%s',%d);""" % (
|
||||
|
||||
@@ -696,6 +696,13 @@ config_str = """
|
||||
- Latitude_Of_Center: EPSG_NAME_PARAMETER_LATITUDE_OF_NATURAL_ORIGIN
|
||||
- Height: EPSG_NAME_PARAMETER_PROJECTION_PLANE_ORIGIN_HEIGHT
|
||||
|
||||
- Equal_Earth:
|
||||
WKT2_name: EPSG_NAME_METHOD_EQUAL_EARTH
|
||||
Params:
|
||||
- False_Easting: EPSG_NAME_PARAMETER_FALSE_EASTING
|
||||
- False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
|
||||
- Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
|
||||
|
||||
|
||||
# Missing/unclear mappings
|
||||
|
||||
|
||||
+6
-24
@@ -29,41 +29,23 @@ else
|
||||
echo "No Doxygen warnings found";
|
||||
fi
|
||||
|
||||
if test $(doxygen --version) = "1.8.17" ; then
|
||||
echo "Doxygen 1.8.17 is incompatible" && /bin/false;
|
||||
fi
|
||||
|
||||
# XML generation (for Breathe)
|
||||
mkdir -p docs/build/tmp_breathe
|
||||
python scripts/generate_breathe_friendly_general_doc.py
|
||||
rm -rf docs/build/xml/
|
||||
|
||||
# Ugly hack to workaround a bug of Doxygen 1.8.17 that erroneously detect proj_network_get_header_value_cbk_type/ as a variable
|
||||
sed "s/const char\* (\*proj_network_get_header_value_cbk_type/CONST_CHAR\* (\*proj_network_get_header_value_cbk_type/" < src/proj.h > docs/build/tmp_breathe/proj.h
|
||||
|
||||
(cat Doxyfile; printf "GENERATE_HTML=NO\nGENERATE_XML=YES\nINPUT= src/iso19111 src/iso19111/operation include/proj docs/build/tmp_breathe/proj.h src/filemanager.cpp src/networkfilemanager.cpp docs/build/tmp_breathe/general_doc.dox.reworked.h") | doxygen - > docs/build/tmp_breathe/docs_log.txt 2>&1
|
||||
if grep -i warning docs/build/tmp_breathe/docs_log.txt; then
|
||||
echo "Doxygen warnings found" && cat docs/build/tmp_breathe/docs_log.txt && /bin/false;
|
||||
(cat Doxyfile; printf "GENERATE_HTML=NO\nGENERATE_XML=YES\nINPUT= src/iso19111 src/iso19111/operation include/proj src/proj.h src/filemanager.cpp src/networkfilemanager.cpp src/general_doc.dox") | doxygen - > docs/build/docs_log.txt 2>&1
|
||||
if grep -i warning docs/build/docs_log.txt; then
|
||||
echo "Doxygen warnings found" && cat docs/build/docs_log.txt && /bin/false;
|
||||
else
|
||||
echo "No Doxygen warnings found";
|
||||
fi
|
||||
|
||||
for i in ${TOPDIR}/docs/build/xml/*; do
|
||||
|
||||
# Fix Breathe error on Doxygen XML
|
||||
# Type must be either just a name or a typedef-like declaration.
|
||||
# If just a name:
|
||||
# Invalid definition: Expected end of definition. [error at 32]
|
||||
# osgeo::proj::common::MeasurePtr = typedef std::shared_ptr<Measure>
|
||||
sed "s/ = typedef /=/g" < $i > $i.tmp;
|
||||
mv $i.tmp $i
|
||||
done
|
||||
|
||||
# There is a confusion for Breathe between PROJStringFormatter::Convention and WKTFormatter:Convention
|
||||
sed "s/Convention/Convention_/g" < ${TOPDIR}/docs/build/xml/classosgeo_1_1proj_1_1io_1_1WKTFormatter.xml | sed "s/WKT2_2018/_WKT2_2018/g" | sed "s/WKT2_2019/_WKT2_2019/g" | sed "s/WKT2_2015/_WKT2_2015/g" | sed "s/WKT1_GDAL/_WKT1_GDAL/g" | sed "s/WKT1_ESRI/_WKT1_ESRI/g" > ${TOPDIR}/docs/build/xml/classosgeo_1_1proj_1_1io_1_1WKTFormatter.xml.tmp
|
||||
mv ${TOPDIR}/docs/build/xml/classosgeo_1_1proj_1_1io_1_1WKTFormatter.xml.tmp ${TOPDIR}/docs/build/xml/classosgeo_1_1proj_1_1io_1_1WKTFormatter.xml
|
||||
|
||||
# Ugly hack to workaround a bug of Doxygen 1.8.17 that erroneously detect proj_network_get_header_value_cbk_type/ as a variable
|
||||
sed "s/CONST_CHAR/const char/" < ${TOPDIR}/docs/build/xml/proj_8h.xml > ${TOPDIR}/docs/build/xml/proj_8h.xml.tmp
|
||||
mv ${TOPDIR}/docs/build/xml/proj_8h.xml.tmp ${TOPDIR}/docs/build/xml/proj_8h.xml
|
||||
|
||||
# Hack for Breathe 4.17.0 issue that is confused by osgeo::proj::common::UnitOfMeasure::Type::NONE (enumeration value of Type) and osgeo::proj::common::UnitOfMeasure::NONE (member value), whereas 4.16.0 works fine.
|
||||
# Filed as https://github.com/michaeljones/breathe/issues/518
|
||||
sed "s/ <name>NONE<\/name>/ <name>Type::NONE<\/name>/" < ${TOPDIR}/docs/build/xml/classosgeo_1_1proj_1_1common_1_1UnitOfMeasure.xml > ${TOPDIR}/docs/build/xml/classosgeo_1_1proj_1_1common_1_1UnitOfMeasure.xml.tmp
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
###############################################################################
|
||||
# $Id$
|
||||
#
|
||||
# Project: PROJ
|
||||
# Purpose: Rework general_doc.dox in a Breathe friendly (hacky) way
|
||||
# Author: Even Rouault <even.rouault at spatialys.com>
|
||||
#
|
||||
###############################################################################
|
||||
# Copyright (c) 2018, Even Rouault <even.rouault at spatialys.com>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
###############################################################################
|
||||
|
||||
import os
|
||||
|
||||
# HACK HACK HACK
|
||||
# Transform a .dox with section, subsection, etc.. in fake namespaces
|
||||
# since Breathe cannot handle such sections and references to them
|
||||
|
||||
script_dir_name = os.path.dirname(os.path.realpath(__file__))
|
||||
general_doc_dox = os.path.join(os.path.dirname(
|
||||
script_dir_name), 'src', 'general_doc.dox')
|
||||
general_doc_dox_reworked_h = os.path.join(os.path.dirname(
|
||||
script_dir_name), 'docs/build/tmp_breathe', 'general_doc.dox.reworked.h')
|
||||
|
||||
out = open(general_doc_dox_reworked_h, 'wt')
|
||||
|
||||
|
||||
class Section:
|
||||
|
||||
def __init__(self):
|
||||
self.name = None
|
||||
self.title = None
|
||||
self.content = ''
|
||||
self.children = []
|
||||
pass
|
||||
|
||||
def serialize(self, out):
|
||||
out.write("/** \\brief %s\n" % self.title)
|
||||
out.write("\n")
|
||||
out.write("%s\n" % self.content)
|
||||
out.write("*/\n")
|
||||
out.write("namespace %s {\n" % self.name)
|
||||
out.write("}\n")
|
||||
for child in self.children:
|
||||
child.serialize(out)
|
||||
|
||||
|
||||
stack = []
|
||||
current = None
|
||||
|
||||
for line in open(general_doc_dox, 'rt').readlines():
|
||||
line = line.strip()
|
||||
if line == '/*!' or line == '*/':
|
||||
continue
|
||||
|
||||
if line.startswith('\page'):
|
||||
|
||||
tokens = line.split(' ')
|
||||
new = Section()
|
||||
new.name = tokens[1]
|
||||
new.title = ' '.join(tokens[2:])
|
||||
current = new
|
||||
stack.append(new)
|
||||
continue
|
||||
|
||||
if line.startswith('\section'):
|
||||
|
||||
stack = stack[0:1]
|
||||
current = stack[-1]
|
||||
|
||||
tokens = line.split(' ')
|
||||
new = Section()
|
||||
new.name = tokens[1]
|
||||
new.title = ' '.join(tokens[2:])
|
||||
current.children.append(new)
|
||||
current = new
|
||||
stack.append(new)
|
||||
continue
|
||||
|
||||
if line.startswith('\subsection'):
|
||||
|
||||
stack = stack[0:2]
|
||||
current = stack[-1]
|
||||
|
||||
tokens = line.split(' ')
|
||||
new = Section()
|
||||
new.name = tokens[1]
|
||||
new.title = ' '.join(tokens[2:])
|
||||
current.children.append(new)
|
||||
current = new
|
||||
stack.append(new)
|
||||
continue
|
||||
|
||||
if line.startswith('\subsubsection'):
|
||||
|
||||
stack = stack[0:3]
|
||||
current = stack[-1]
|
||||
|
||||
tokens = line.split(' ')
|
||||
new = Section()
|
||||
new.name = tokens[1]
|
||||
new.title = ' '.join(tokens[2:])
|
||||
current.children.append(new)
|
||||
current = new
|
||||
stack.append(new)
|
||||
continue
|
||||
|
||||
if current:
|
||||
current.content += line + '\n'
|
||||
|
||||
for child in stack[0].children:
|
||||
child.serialize(out)
|
||||
+7
-8
@@ -203,7 +203,7 @@ double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coord) {
|
||||
|
||||
/**************************************************************************************/
|
||||
int pj_get_suggested_operation(PJ_CONTEXT*,
|
||||
const std::vector<CoordOperation>& opList,
|
||||
const std::vector<PJCoordOperation>& opList,
|
||||
const int iExcluded[2],
|
||||
PJ_DIRECTION direction,
|
||||
PJ_COORD coord)
|
||||
@@ -1034,7 +1034,7 @@ static PJ* add_coord_op_to_list(
|
||||
PJ* pjGeogToSrc,
|
||||
PJ* pjGeogToDst,
|
||||
bool isOffshore,
|
||||
std::vector<CoordOperation>& altCoordOps) {
|
||||
std::vector<PJCoordOperation>& altCoordOps) {
|
||||
/*****************************************************************************/
|
||||
|
||||
double minxSrc;
|
||||
@@ -1193,7 +1193,7 @@ PJ *proj_create_crs_to_crs (PJ_CONTEXT *ctx, const char *source_crs, const char
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
std::vector<CoordOperation> pj_create_prepared_operations(PJ_CONTEXT *ctx,
|
||||
std::vector<PJCoordOperation> pj_create_prepared_operations(PJ_CONTEXT *ctx,
|
||||
const PJ *source_crs,
|
||||
const PJ *target_crs,
|
||||
PJ_OBJ_LIST* op_list)
|
||||
@@ -1218,7 +1218,7 @@ std::vector<CoordOperation> pj_create_prepared_operations(PJ_CONTEXT *ctx,
|
||||
|
||||
try
|
||||
{
|
||||
std::vector<CoordOperation> preparedOpList;
|
||||
std::vector<PJCoordOperation> preparedOpList;
|
||||
|
||||
// Iterate over source->target candidate transformations and reproject
|
||||
// their long-lat bounding box into the source CRS.
|
||||
@@ -1350,11 +1350,9 @@ PJ *proj_create_crs_to_crs_from_pj (PJ_CONTEXT *ctx, const PJ *source_crs, cons
|
||||
area->east_lon_degree,
|
||||
area->north_lat_degree);
|
||||
}
|
||||
else {
|
||||
proj_operation_factory_context_set_spatial_criterion(
|
||||
ctx, operation_ctx, PROJ_SPATIAL_CRITERION_PARTIAL_INTERSECTION);
|
||||
}
|
||||
|
||||
proj_operation_factory_context_set_spatial_criterion(
|
||||
ctx, operation_ctx, PROJ_SPATIAL_CRITERION_PARTIAL_INTERSECTION);
|
||||
proj_operation_factory_context_set_grid_availability_use(
|
||||
ctx, operation_ctx,
|
||||
proj_context_is_network_enabled(ctx) ?
|
||||
@@ -1407,6 +1405,7 @@ PJ *proj_create_crs_to_crs_from_pj (PJ_CONTEXT *ctx, const PJ *source_crs, cons
|
||||
|
||||
P->alternativeCoordinateOperations = std::move(preparedOpList);
|
||||
// The returned P is rather dummy
|
||||
P->descr = "Set of coordinate operations";
|
||||
P->iso_obj = nullptr;
|
||||
P->fwd = nullptr;
|
||||
P->inv = nullptr;
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ geodtest_LDADD = libproj.la
|
||||
|
||||
lib_LTLIBRARIES = libproj.la
|
||||
|
||||
libproj_la_LDFLAGS = -no-undefined -version-info 22:0:0
|
||||
libproj_la_LDFLAGS = -no-undefined -version-info 22:1:0
|
||||
libproj_la_LIBADD = @SQLITE3_LIBS@ @TIFF_LIBS@ @CURL_LIBS@
|
||||
|
||||
libproj_la_SOURCES = \
|
||||
|
||||
+7
-1
@@ -422,7 +422,13 @@ int main(int argc, char **argv) {
|
||||
emess(1, "missing argument for --accuracy");
|
||||
std::exit(1);
|
||||
}
|
||||
accuracy = c_locale_stod(*argv);
|
||||
try {
|
||||
accuracy = c_locale_stod(*argv);
|
||||
} catch (const std::exception &e) {
|
||||
std::cerr << "Invalid value for option --accuracy: "
|
||||
<< e.what() << std::endl;
|
||||
std::exit(1);
|
||||
}
|
||||
}
|
||||
else if (strcmp(*argv, "--authority") == 0 ) {
|
||||
++argv;
|
||||
|
||||
+13
-8
@@ -187,8 +187,8 @@ static BaseObjectNNPtr buildObject(
|
||||
try {
|
||||
auto tokens = split(l_user_string, ':');
|
||||
if (kind == "operation" && tokens.size() == 2) {
|
||||
auto urn = "urn:ogc:def:coordinateOperation:" + tokens[0] + "::" +
|
||||
tokens[1];
|
||||
auto urn = "urn:ogc:def:coordinateOperation:" + tokens[0] +
|
||||
"::" + tokens[1];
|
||||
obj = createFromUserInput(urn, dbContext).as_nullable();
|
||||
} else if ((kind == "ellipsoid" || kind == "datum" ||
|
||||
kind == "ensemble") &&
|
||||
@@ -942,7 +942,13 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
} else if (arg == "--accuracy" && i + 1 < argc) {
|
||||
i++;
|
||||
minimumAccuracy = c_locale_stod(argv[i]);
|
||||
try {
|
||||
minimumAccuracy = c_locale_stod(argv[i]);
|
||||
} catch (const std::exception &e) {
|
||||
std::cerr << "Invalid value for option --accuracy: " << e.what()
|
||||
<< std::endl;
|
||||
usage();
|
||||
}
|
||||
} else if (arg == "--area" && i + 1 < argc) {
|
||||
i++;
|
||||
area = argv[i];
|
||||
@@ -1214,11 +1220,10 @@ int main(int argc, char **argv) {
|
||||
if (crs) {
|
||||
try {
|
||||
auto res = crs->identify(
|
||||
dbContext
|
||||
? AuthorityFactory::create(
|
||||
NN_NO_CHECK(dbContext), authority)
|
||||
.as_nullable()
|
||||
: nullptr);
|
||||
dbContext ? AuthorityFactory::create(
|
||||
NN_NO_CHECK(dbContext), authority)
|
||||
.as_nullable()
|
||||
: nullptr);
|
||||
std::cout << std::endl;
|
||||
std::cout
|
||||
<< "Identification match count: " << res.size()
|
||||
|
||||
@@ -55,7 +55,7 @@ class ParsingException : public std::exception {
|
||||
explicit ParsingException(const char *msg) : msg_(msg) {}
|
||||
const char *what() const noexcept override { return msg_.c_str(); }
|
||||
};
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -514,9 +514,8 @@ int main(int argc, char *argv[]) {
|
||||
std::cout << url << "... (" << i + 1 << " / "
|
||||
<< to_download.size() << ")" << std::endl;
|
||||
}
|
||||
if (!dryRun &&
|
||||
!proj_download_file(ctx, url.c_str(), false, nullptr,
|
||||
nullptr)) {
|
||||
if (!dryRun && !proj_download_file(ctx, url.c_str(), false, nullptr,
|
||||
nullptr)) {
|
||||
std::cerr << "Cannot download " << url << std::endl;
|
||||
std::exit(1);
|
||||
}
|
||||
|
||||
+8
-8
@@ -1110,7 +1110,7 @@ void proj_context_set_sqlite3_vfs_name(PJ_CONTEXT *ctx, const char *name) {
|
||||
* already.
|
||||
* @return The path to the PROJ user writable directory.
|
||||
* @since 7.1
|
||||
*/
|
||||
*/
|
||||
|
||||
const char *proj_context_get_user_writable_directory(PJ_CONTEXT *ctx,
|
||||
int create) {
|
||||
@@ -1181,12 +1181,12 @@ const char *proj_context_get_user_writable_directory(PJ_CONTEXT *ctx,
|
||||
}
|
||||
|
||||
/** Get the URL endpoint to query for remote grids.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @return Endpoint URL. The returned pointer would be invalidated
|
||||
* by a later call to proj_context_set_url_endpoint()
|
||||
* @since 7.1
|
||||
*/
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @return Endpoint URL. The returned pointer would be invalidated
|
||||
* by a later call to proj_context_set_url_endpoint()
|
||||
* @since 7.1
|
||||
*/
|
||||
const char *proj_context_get_url_endpoint(PJ_CONTEXT *ctx) {
|
||||
if (ctx == nullptr) {
|
||||
ctx = pj_get_default_ctx();
|
||||
@@ -1267,7 +1267,7 @@ static std::string pj_get_relative_share_proj_internal_no_check() {
|
||||
constexpr char dir_sep = '\\';
|
||||
#else
|
||||
Dl_info info;
|
||||
if (!dladdr((const void *)pj_get_relative_share_proj, &info)) {
|
||||
if (!dladdr((void *)pj_get_relative_share_proj, &info)) {
|
||||
return std::string();
|
||||
}
|
||||
std::string out(info.dli_fname);
|
||||
|
||||
@@ -55,7 +55,7 @@ PJ_LP pj_generic_inverse_2d(PJ_XY xy, PJ *P, PJ_LP lpInitial) {
|
||||
return lp;
|
||||
}
|
||||
|
||||
if (fabs(deltaX) > 1e-6 || fabs(deltaY) > 1e-6) {
|
||||
if (i == 0 || fabs(deltaX) > 1e-6 || fabs(deltaY) > 1e-6) {
|
||||
// Compute Jacobian matrix (only if we aren't close to the final
|
||||
// result to speed things a bit)
|
||||
PJ_LP lp2;
|
||||
|
||||
+12
-9
@@ -897,8 +897,9 @@ std::unique_ptr<GTiffGrid> GTiffDataset::nextGrid() {
|
||||
else if (sampleFormat == SAMPLEFORMAT_IEEEFP && bitsPerSample == 64)
|
||||
dt = TIFFDataType::Float64;
|
||||
else {
|
||||
pj_log(m_ctx, PJ_LOG_ERROR, _("Unsupported combination of SampleFormat "
|
||||
"and BitsPerSample values"));
|
||||
pj_log(m_ctx, PJ_LOG_ERROR,
|
||||
_("Unsupported combination of SampleFormat "
|
||||
"and BitsPerSample values"));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -998,8 +999,9 @@ std::unique_ptr<GTiffGrid> GTiffDataset::nextGrid() {
|
||||
// a GeoTransformationMatrix, since negative values in GeoPixelScale
|
||||
// have historically been implementation bugs.
|
||||
if (matrix[1] != 0 || matrix[4] != 0) {
|
||||
pj_log(m_ctx, PJ_LOG_ERROR, _("Rotational terms not supported in "
|
||||
"GeoTransformationMatrix tag"));
|
||||
pj_log(m_ctx, PJ_LOG_ERROR,
|
||||
_("Rotational terms not supported in "
|
||||
"GeoTransformationMatrix tag"));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -1833,10 +1835,9 @@ bool NTv2Grid::valueAt(int x, int y, bool compensateNTConvention,
|
||||
float two_float[2];
|
||||
// NTv2 is organized from east to west !
|
||||
// there are 4 components: lat shift, lon shift, lat error, lon error
|
||||
m_fp->seek(
|
||||
m_offset +
|
||||
4 * sizeof(float) *
|
||||
(static_cast<unsigned long long>(y) * m_width + m_width - 1 - x));
|
||||
m_fp->seek(m_offset + 4 * sizeof(float) *
|
||||
(static_cast<unsigned long long>(y) * m_width +
|
||||
m_width - 1 - x));
|
||||
if (m_fp->read(&two_float[0], sizeof(two_float)) != sizeof(two_float)) {
|
||||
proj_context_errno_set(m_ctx,
|
||||
PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID);
|
||||
@@ -2893,7 +2894,9 @@ ListOfHGrids pj_hgrid_init(PJ *P, const char *gridkey) {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
typedef struct { pj_int32 lam, phi; } ILP;
|
||||
typedef struct {
|
||||
pj_int32 lam, phi;
|
||||
} ILP;
|
||||
|
||||
// Apply bilinear interpolation for horizontal shift grids
|
||||
static PJ_LP pj_hgrid_interpolate(PJ_LP t, const HorizontalShiftGrid *grid,
|
||||
|
||||
+64
-11
@@ -59,6 +59,7 @@
|
||||
#include "proj_experimental.h"
|
||||
// clang-format on
|
||||
#include "proj_constants.h"
|
||||
#include "geodesic.h"
|
||||
|
||||
using namespace NS_PROJ::common;
|
||||
using namespace NS_PROJ::crs;
|
||||
@@ -205,6 +206,26 @@ static PJ *pj_obj_create(PJ_CONTEXT *ctx, const IdentifiedObjectNNPtr &objIn) {
|
||||
pj->ctx = ctx;
|
||||
pj->descr = "ISO-19111 object";
|
||||
pj->iso_obj = objIn;
|
||||
try {
|
||||
auto crs = dynamic_cast<const CRS *>(objIn.get());
|
||||
if (crs) {
|
||||
auto geodCRS = crs->extractGeodeticCRS();
|
||||
if (geodCRS) {
|
||||
const auto &ellps = geodCRS->ellipsoid();
|
||||
const double a = ellps->semiMajorAxis().getSIValue();
|
||||
const double es = ellps->squaredEccentricity();
|
||||
pj_calc_ellipsoid_params(pj, a, es);
|
||||
assert(pj->geod == nullptr);
|
||||
pj->geod = static_cast<struct geod_geodesic *>(
|
||||
calloc(1, sizeof(struct geod_geodesic)));
|
||||
if (pj->geod) {
|
||||
geod_init(pj->geod, pj->a,
|
||||
pj->es / (1 + sqrt(pj->one_es)));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (const std::exception &) {
|
||||
}
|
||||
}
|
||||
ctx->safeAutoCloseDbIfNeeded();
|
||||
return pj;
|
||||
@@ -413,8 +434,11 @@ static const char *getOptionValue(const char *option,
|
||||
|
||||
/** \brief "Clone" an object.
|
||||
*
|
||||
* Technically this just increases the reference counter on the object, since
|
||||
* PJ objects are immutable.
|
||||
* The object might be used independently of the original object, provided that
|
||||
* the use of context is compatible. In particular if you intend to use a
|
||||
* clone in a different thread than the original object, you should pass a
|
||||
* context that is different from the one of the original object (or later
|
||||
* assing a different context with proj_assign_context()).
|
||||
*
|
||||
* The returned object must be unreferenced with proj_destroy() after use.
|
||||
* It should be used by at most one thread at a time.
|
||||
@@ -432,6 +456,18 @@ PJ *proj_clone(PJ_CONTEXT *ctx, const PJ *obj) {
|
||||
return nullptr;
|
||||
}
|
||||
if (!obj->iso_obj) {
|
||||
if (!obj->alternativeCoordinateOperations.empty()) {
|
||||
auto newPj = pj_new();
|
||||
if (newPj) {
|
||||
newPj->descr = "Set of coordinate operations";
|
||||
newPj->ctx = ctx;
|
||||
for (const auto &altOp : obj->alternativeCoordinateOperations) {
|
||||
newPj->alternativeCoordinateOperations.emplace_back(
|
||||
PJCoordOperation(ctx, altOp));
|
||||
}
|
||||
}
|
||||
return newPj;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
try {
|
||||
@@ -1247,6 +1283,21 @@ static int proj_is_equivalent_to_internal(PJ_CONTEXT *ctx, const PJ *obj,
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (obj->iso_obj == nullptr && other->iso_obj == nullptr &&
|
||||
!obj->alternativeCoordinateOperations.empty() &&
|
||||
obj->alternativeCoordinateOperations.size() ==
|
||||
other->alternativeCoordinateOperations.size()) {
|
||||
for (size_t i = 0; i < obj->alternativeCoordinateOperations.size();
|
||||
++i) {
|
||||
if (obj->alternativeCoordinateOperations[i] !=
|
||||
other->alternativeCoordinateOperations[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!obj->iso_obj || !other->iso_obj) {
|
||||
return false;
|
||||
}
|
||||
@@ -7843,7 +7894,7 @@ struct PJ_OPERATION_LIST : PJ_OBJ_LIST {
|
||||
PJ *source_crs;
|
||||
PJ *target_crs;
|
||||
bool hasPreparedOperation = false;
|
||||
std::vector<CoordOperation> preparedOperations{};
|
||||
std::vector<PJCoordOperation> preparedOperations{};
|
||||
|
||||
explicit PJ_OPERATION_LIST(PJ_CONTEXT *ctx, const PJ *source_crsIn,
|
||||
const PJ *target_crsIn,
|
||||
@@ -7853,7 +7904,7 @@ struct PJ_OPERATION_LIST : PJ_OBJ_LIST {
|
||||
PJ_OPERATION_LIST(const PJ_OPERATION_LIST &) = delete;
|
||||
PJ_OPERATION_LIST &operator=(const PJ_OPERATION_LIST &) = delete;
|
||||
|
||||
const std::vector<CoordOperation> &getPreparedOperations(PJ_CONTEXT *ctx);
|
||||
const std::vector<PJCoordOperation> &getPreparedOperations(PJ_CONTEXT *ctx);
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -7878,7 +7929,7 @@ PJ_OPERATION_LIST::~PJ_OPERATION_LIST() {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const std::vector<CoordOperation> &
|
||||
const std::vector<PJCoordOperation> &
|
||||
PJ_OPERATION_LIST::getPreparedOperations(PJ_CONTEXT *ctx) {
|
||||
if (!hasPreparedOperation) {
|
||||
hasPreparedOperation = true;
|
||||
@@ -8323,9 +8374,10 @@ double proj_dynamic_datum_get_frame_reference_epoch(PJ_CONTEXT *ctx,
|
||||
auto dvrf = dynamic_cast<const DynamicVerticalReferenceFrame *>(
|
||||
datum->iso_obj.get());
|
||||
if (!dgrf && !dvrf) {
|
||||
proj_log_error(ctx, __FUNCTION__, "Object is not a "
|
||||
"DynamicGeodeticReferenceFrame or "
|
||||
"DynamicVerticalReferenceFrame");
|
||||
proj_log_error(ctx, __FUNCTION__,
|
||||
"Object is not a "
|
||||
"DynamicGeodeticReferenceFrame or "
|
||||
"DynamicVerticalReferenceFrame");
|
||||
return -1;
|
||||
}
|
||||
const auto &frameReferenceEpoch =
|
||||
@@ -8592,9 +8644,10 @@ PJ *proj_normalize_for_visualization(PJ_CONTEXT *ctx, const PJ *obj) {
|
||||
|
||||
auto co = dynamic_cast<const CoordinateOperation *>(obj->iso_obj.get());
|
||||
if (!co) {
|
||||
proj_log_error(ctx, __FUNCTION__, "Object is not a CoordinateOperation "
|
||||
"created with "
|
||||
"proj_create_crs_to_crs");
|
||||
proj_log_error(ctx, __FUNCTION__,
|
||||
"Object is not a CoordinateOperation "
|
||||
"created with "
|
||||
"proj_create_crs_to_crs");
|
||||
return nullptr;
|
||||
}
|
||||
try {
|
||||
|
||||
+114
-46
@@ -586,9 +586,8 @@ CRSNNPtr CRS::createBoundCRSToWGS84IfPossible(
|
||||
firstOpIsConversion)) {
|
||||
transf = util::nn_dynamic_pointer_cast<
|
||||
operation::Transformation>(subops[1]);
|
||||
if (transf &&
|
||||
!starts_with(transf->nameStr(),
|
||||
"Ballpark geo")) {
|
||||
if (transf && !starts_with(transf->nameStr(),
|
||||
"Ballpark geo")) {
|
||||
try {
|
||||
transf->getTOWGS84Parameters();
|
||||
} catch (const std::exception &) {
|
||||
@@ -823,21 +822,58 @@ bool CRS::mustAxisOrderBeSwitchedForVisualization() const {
|
||||
//! @cond Doxygen_Suppress
|
||||
|
||||
CRSNNPtr CRS::normalizeForVisualization() const {
|
||||
auto props = util::PropertyMap().set(
|
||||
common::IdentifiedObject::NAME_KEY,
|
||||
nameStr() + " (with axis order normalized for visualization)");
|
||||
|
||||
const auto createProperties = [this](const std::string &newName =
|
||||
std::string()) {
|
||||
auto props = util::PropertyMap().set(
|
||||
common::IdentifiedObject::NAME_KEY,
|
||||
!newName.empty()
|
||||
? newName
|
||||
: nameStr() +
|
||||
" (with axis order normalized for visualization)");
|
||||
const auto &l_domains = domains();
|
||||
if (!l_domains.empty()) {
|
||||
auto array = util::ArrayOfBaseObject::create();
|
||||
for (const auto &domain : l_domains) {
|
||||
array->add(domain);
|
||||
}
|
||||
if (!array->empty()) {
|
||||
props.set(common::ObjectUsage::OBJECT_DOMAIN_KEY, array);
|
||||
}
|
||||
}
|
||||
const auto &l_identifiers = identifiers();
|
||||
const auto &l_remarks = remarks();
|
||||
if (l_identifiers.size() == 1) {
|
||||
std::string remarks("Axis order reversed compared to ");
|
||||
remarks += *(l_identifiers[0]->codeSpace());
|
||||
remarks += ':';
|
||||
remarks += l_identifiers[0]->code();
|
||||
if (!l_remarks.empty()) {
|
||||
remarks += ". ";
|
||||
remarks += l_remarks;
|
||||
}
|
||||
props.set(common::IdentifiedObject::REMARKS_KEY, remarks);
|
||||
} else if (!l_remarks.empty()) {
|
||||
props.set(common::IdentifiedObject::REMARKS_KEY, l_remarks);
|
||||
}
|
||||
return props;
|
||||
};
|
||||
|
||||
const CompoundCRS *compoundCRS = dynamic_cast<const CompoundCRS *>(this);
|
||||
if (compoundCRS) {
|
||||
const auto &comps = compoundCRS->componentReferenceSystems();
|
||||
if (!comps.empty()) {
|
||||
if (!comps.empty() &&
|
||||
comps[0]->mustAxisOrderBeSwitchedForVisualization()) {
|
||||
std::vector<CRSNNPtr> newComps;
|
||||
newComps.emplace_back(comps[0]->normalizeForVisualization());
|
||||
std::string l_name = newComps.back()->nameStr();
|
||||
for (size_t i = 1; i < comps.size(); i++) {
|
||||
newComps.emplace_back(comps[i]);
|
||||
l_name += " + ";
|
||||
l_name += newComps.back()->nameStr();
|
||||
}
|
||||
return util::nn_static_pointer_cast<CRS>(
|
||||
CompoundCRS::create(props, newComps));
|
||||
CompoundCRS::create(createProperties(l_name), newComps));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -851,8 +887,9 @@ CRSNNPtr CRS::normalizeForVisualization() const {
|
||||
: cs::EllipsoidalCS::create(util::PropertyMap(),
|
||||
axisList[1], axisList[0],
|
||||
axisList[2]);
|
||||
return util::nn_static_pointer_cast<CRS>(GeographicCRS::create(
|
||||
props, geogCRS->datum(), geogCRS->datumEnsemble(), cs));
|
||||
return util::nn_static_pointer_cast<CRS>(
|
||||
GeographicCRS::create(createProperties(), geogCRS->datum(),
|
||||
geogCRS->datumEnsemble(), cs));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -866,8 +903,9 @@ CRSNNPtr CRS::normalizeForVisualization() const {
|
||||
axisList[0])
|
||||
: cs::CartesianCS::create(util::PropertyMap(), axisList[1],
|
||||
axisList[0], axisList[2]);
|
||||
return util::nn_static_pointer_cast<CRS>(ProjectedCRS::create(
|
||||
props, projCRS->baseCRS(), projCRS->derivingConversion(), cs));
|
||||
return util::nn_static_pointer_cast<CRS>(
|
||||
ProjectedCRS::create(createProperties(), projCRS->baseCRS(),
|
||||
projCRS->derivingConversion(), cs));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1001,13 +1039,38 @@ CRSNNPtr CRS::promoteTo3D(const std::string &newName,
|
||||
auto props =
|
||||
util::PropertyMap().set(common::IdentifiedObject::NAME_KEY,
|
||||
!newName.empty() ? newName : nameStr());
|
||||
const auto &l_domains = domains();
|
||||
if (!l_domains.empty()) {
|
||||
auto array = util::ArrayOfBaseObject::create();
|
||||
for (const auto &domain : l_domains) {
|
||||
auto extent = domain->domainOfValidity();
|
||||
if (extent) {
|
||||
// Propagate only the extent, not the scope, as it might
|
||||
// imply more that we can guarantee with the promotion to
|
||||
// 3D.
|
||||
auto newDomain = common::ObjectDomain::create(
|
||||
util::optional<std::string>(), extent);
|
||||
array->add(newDomain);
|
||||
}
|
||||
}
|
||||
if (!array->empty()) {
|
||||
props.set(common::ObjectUsage::OBJECT_DOMAIN_KEY, array);
|
||||
}
|
||||
}
|
||||
const auto &l_identifiers = identifiers();
|
||||
const auto &l_remarks = remarks();
|
||||
if (l_identifiers.size() == 1) {
|
||||
std::string remarks("Promoted to 3D from ");
|
||||
remarks += *(l_identifiers[0]->codeSpace());
|
||||
remarks += ':';
|
||||
remarks += l_identifiers[0]->code();
|
||||
if (!l_remarks.empty()) {
|
||||
remarks += ". ";
|
||||
remarks += l_remarks;
|
||||
}
|
||||
props.set(common::IdentifiedObject::REMARKS_KEY, remarks);
|
||||
} else if (!l_remarks.empty()) {
|
||||
props.set(common::IdentifiedObject::REMARKS_KEY, l_remarks);
|
||||
}
|
||||
return props;
|
||||
};
|
||||
@@ -2128,23 +2191,25 @@ GeodeticCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const {
|
||||
|
||||
const auto thisDatum(datumNonNull(dbContext));
|
||||
|
||||
auto searchByDatumCode = [this, &authorityFactory, &res,
|
||||
&geodetic_crs_type, crsCriterion, &dbContext](
|
||||
const common::IdentifiedObjectNNPtr &l_datum) {
|
||||
for (const auto &id : l_datum->identifiers()) {
|
||||
try {
|
||||
auto tempRes = authorityFactory->createGeodeticCRSFromDatum(
|
||||
*id->codeSpace(), id->code(), geodetic_crs_type);
|
||||
for (const auto &crs : tempRes) {
|
||||
if (_isEquivalentTo(crs.get(), crsCriterion,
|
||||
dbContext)) {
|
||||
res.emplace_back(crs, 70);
|
||||
auto searchByDatumCode =
|
||||
[this, &authorityFactory, &res, &geodetic_crs_type, crsCriterion,
|
||||
&dbContext](const common::IdentifiedObjectNNPtr &l_datum) {
|
||||
for (const auto &id : l_datum->identifiers()) {
|
||||
try {
|
||||
auto tempRes =
|
||||
authorityFactory->createGeodeticCRSFromDatum(
|
||||
*id->codeSpace(), id->code(),
|
||||
geodetic_crs_type);
|
||||
for (const auto &crs : tempRes) {
|
||||
if (_isEquivalentTo(crs.get(), crsCriterion,
|
||||
dbContext)) {
|
||||
res.emplace_back(crs, 70);
|
||||
}
|
||||
}
|
||||
} catch (const std::exception &) {
|
||||
}
|
||||
} catch (const std::exception &) {
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
auto searchByEllipsoid = [this, &authorityFactory, &res, &thisDatum,
|
||||
&geodetic_crs_type, l_implicitCS,
|
||||
@@ -2193,8 +2258,9 @@ GeodeticCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const {
|
||||
searchByDatumCode(thisDatum);
|
||||
} else {
|
||||
auto candidateDatums = authorityFactory->createObjectsFromName(
|
||||
thisDatum->nameStr(), {io::AuthorityFactory::ObjectType::
|
||||
GEODETIC_REFERENCE_FRAME},
|
||||
thisDatum->nameStr(),
|
||||
{io::AuthorityFactory::ObjectType::
|
||||
GEODETIC_REFERENCE_FRAME},
|
||||
false);
|
||||
const size_t sizeBefore = res.size();
|
||||
for (const auto &candidateDatum : candidateDatums) {
|
||||
@@ -2682,9 +2748,8 @@ GeographicCRS::demoteTo2D(const std::string &newName,
|
||||
const auto &firstRes = res.front();
|
||||
auto firstResAsGeogCRS =
|
||||
util::nn_dynamic_pointer_cast<GeographicCRS>(firstRes);
|
||||
if (firstResAsGeogCRS &&
|
||||
firstResAsGeogCRS->is2DPartOf3D(NN_NO_CHECK(this),
|
||||
dbContext)) {
|
||||
if (firstResAsGeogCRS && firstResAsGeogCRS->is2DPartOf3D(
|
||||
NN_NO_CHECK(this), dbContext)) {
|
||||
return NN_NO_CHECK(firstResAsGeogCRS);
|
||||
}
|
||||
}
|
||||
@@ -4132,9 +4197,8 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const {
|
||||
l_datum->nameStr() != "unnamed";
|
||||
const auto &ellipsoid = l_baseCRS->ellipsoid();
|
||||
auto geogCRS = dynamic_cast<const GeographicCRS *>(l_baseCRS.get());
|
||||
if (geogCRS &&
|
||||
geogCRS->coordinateSystem()->axisOrder() ==
|
||||
cs::EllipsoidalCS::AxisOrder::LONG_EAST_LAT_NORTH) {
|
||||
if (geogCRS && geogCRS->coordinateSystem()->axisOrder() ==
|
||||
cs::EllipsoidalCS::AxisOrder::LONG_EAST_LAT_NORTH) {
|
||||
baseRes =
|
||||
GeographicCRS::create(
|
||||
util::PropertyMap().set(common::IdentifiedObject::NAME_KEY,
|
||||
@@ -4218,16 +4282,18 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const {
|
||||
const bool l_implicitCS = hasImplicitCS();
|
||||
const auto addCRS = [&](const ProjectedCRSNNPtr &crs, const bool eqName) {
|
||||
const auto &l_unit = cs->axisList()[0]->unit();
|
||||
if (_isEquivalentTo(crs.get(), util::IComparable::Criterion::
|
||||
EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS,
|
||||
if (_isEquivalentTo(crs.get(),
|
||||
util::IComparable::Criterion::
|
||||
EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS,
|
||||
dbContext) ||
|
||||
(l_implicitCS &&
|
||||
l_unit._isEquivalentTo(
|
||||
crs->coordinateSystem()->axisList()[0]->unit(),
|
||||
util::IComparable::Criterion::EQUIVALENT) &&
|
||||
l_baseCRS->_isEquivalentTo(
|
||||
crs->baseCRS().get(), util::IComparable::Criterion::
|
||||
EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS,
|
||||
crs->baseCRS().get(),
|
||||
util::IComparable::Criterion::
|
||||
EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS,
|
||||
dbContext) &&
|
||||
derivingConversionRef()->_isEquivalentTo(
|
||||
crs->derivingConversionRef().get(),
|
||||
@@ -4285,8 +4351,9 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const {
|
||||
*id->codeSpace())
|
||||
->createProjectedCRS(id->code());
|
||||
bool match = _isEquivalentTo(
|
||||
crs.get(), util::IComparable::Criterion::
|
||||
EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS,
|
||||
crs.get(),
|
||||
util::IComparable::Criterion::
|
||||
EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS,
|
||||
dbContext);
|
||||
res.emplace_back(crs, match ? 100 : 25);
|
||||
return res;
|
||||
@@ -4961,8 +5028,8 @@ CompoundCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const {
|
||||
thisName.c_str(), newCRS->nameStr().c_str());
|
||||
res.emplace_back(
|
||||
newCRS,
|
||||
std::min(thisName == newCRS->nameStr() ? 100 : eqName ? 90
|
||||
: 70,
|
||||
std::min(thisName == newCRS->nameStr() ? 100
|
||||
: eqName ? 90 : 70,
|
||||
std::min(candidatesHorizCRS.front().second,
|
||||
candidatesVertCRS.front().second)));
|
||||
}
|
||||
@@ -5433,10 +5500,11 @@ BoundCRS::_identify(const io::AuthorityFactoryPtr &authorityFactory) const {
|
||||
opTransfPROJString = opNormalized->exportToPROJString(
|
||||
io::PROJStringFormatter::create().get());
|
||||
opTransfPROJStringValid = true;
|
||||
opTransfPROJString = replaceAll(
|
||||
opTransfPROJString, " +rx=0 +ry=0 +rz=0 +s=0 "
|
||||
"+convention=position_vector",
|
||||
"");
|
||||
opTransfPROJString =
|
||||
replaceAll(opTransfPROJString,
|
||||
" +rx=0 +ry=0 +rz=0 +s=0 "
|
||||
"+convention=position_vector",
|
||||
"");
|
||||
} catch (const std::exception &) {
|
||||
}
|
||||
if ((refTransfPROJStringValid && opTransfPROJStringValid &&
|
||||
|
||||
@@ -835,9 +835,8 @@ void Ellipsoid::_exportToWKT(
|
||||
}
|
||||
formatter->add(computedInverseFlattening());
|
||||
const auto &unit = semiMajor.unit();
|
||||
if (isWKT2 &&
|
||||
!(formatter->ellipsoidUnitOmittedIfMetre() &&
|
||||
unit == common::UnitOfMeasure::METRE)) {
|
||||
if (isWKT2 && !(formatter->ellipsoidUnitOmittedIfMetre() &&
|
||||
unit == common::UnitOfMeasure::METRE)) {
|
||||
unit._exportToWKT(formatter, io::WKTConstants::LENGTHUNIT);
|
||||
}
|
||||
if (formatter->outputId()) {
|
||||
@@ -1269,8 +1268,9 @@ void GeodeticReferenceFrame::_exportToWKT(
|
||||
// as to trigger the caching done in createObjectsFromName()
|
||||
// in that case.
|
||||
auto matches = factory->createObjectsFromName(
|
||||
l_name, {io::AuthorityFactory::ObjectType::
|
||||
GEODETIC_REFERENCE_FRAME},
|
||||
l_name,
|
||||
{io::AuthorityFactory::ObjectType::
|
||||
GEODETIC_REFERENCE_FRAME},
|
||||
true, 2);
|
||||
if (matches.size() == 1) {
|
||||
const auto &match = matches.front();
|
||||
@@ -1870,8 +1870,8 @@ RealizationMethod::RealizationMethod(const std::string &nameIn)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
RealizationMethod &RealizationMethod::
|
||||
operator=(const RealizationMethod &other) {
|
||||
RealizationMethod &
|
||||
RealizationMethod::operator=(const RealizationMethod &other) {
|
||||
CodeList::operator=(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
+150
-88
@@ -193,28 +193,28 @@ struct DatabaseContext::Private {
|
||||
void cache(const std::string &code, const crs::CRSNNPtr &crs);
|
||||
|
||||
datum::GeodeticReferenceFramePtr
|
||||
// cppcheck-suppress functionStatic
|
||||
getGeodeticDatumFromCache(const std::string &code);
|
||||
// cppcheck-suppress functionStatic
|
||||
getGeodeticDatumFromCache(const std::string &code);
|
||||
// cppcheck-suppress functionStatic
|
||||
void cache(const std::string &code,
|
||||
const datum::GeodeticReferenceFrameNNPtr &datum);
|
||||
|
||||
datum::DatumEnsemblePtr
|
||||
// cppcheck-suppress functionStatic
|
||||
getDatumEnsembleFromCache(const std::string &code);
|
||||
// cppcheck-suppress functionStatic
|
||||
getDatumEnsembleFromCache(const std::string &code);
|
||||
// cppcheck-suppress functionStatic
|
||||
void cache(const std::string &code,
|
||||
const datum::DatumEnsembleNNPtr &datumEnsemble);
|
||||
|
||||
datum::EllipsoidPtr
|
||||
// cppcheck-suppress functionStatic
|
||||
getEllipsoidFromCache(const std::string &code);
|
||||
// cppcheck-suppress functionStatic
|
||||
getEllipsoidFromCache(const std::string &code);
|
||||
// cppcheck-suppress functionStatic
|
||||
void cache(const std::string &code, const datum::EllipsoidNNPtr &ellipsoid);
|
||||
|
||||
datum::PrimeMeridianPtr
|
||||
// cppcheck-suppress functionStatic
|
||||
getPrimeMeridianFromCache(const std::string &code);
|
||||
// cppcheck-suppress functionStatic
|
||||
getPrimeMeridianFromCache(const std::string &code);
|
||||
// cppcheck-suppress functionStatic
|
||||
void cache(const std::string &code, const datum::PrimeMeridianNNPtr &pm);
|
||||
|
||||
@@ -617,20 +617,20 @@ void DatabaseContext::Private::checkDatabaseLayout() {
|
||||
}
|
||||
}
|
||||
if (nMajor != DATABASE_LAYOUT_VERSION_MAJOR) {
|
||||
throw FactoryException(databasePath_ +
|
||||
" contains DATABASE.LAYOUT.VERSION.MAJOR = " +
|
||||
toString(nMajor) + " whereas " +
|
||||
toString(DATABASE_LAYOUT_VERSION_MAJOR) +
|
||||
" is expected. "
|
||||
"It comes from another PROJ installation.");
|
||||
throw FactoryException(
|
||||
databasePath_ +
|
||||
" contains DATABASE.LAYOUT.VERSION.MAJOR = " + toString(nMajor) +
|
||||
" whereas " + toString(DATABASE_LAYOUT_VERSION_MAJOR) +
|
||||
" is expected. "
|
||||
"It comes from another PROJ installation.");
|
||||
}
|
||||
if (nMinor < DATABASE_LAYOUT_VERSION_MINOR) {
|
||||
throw FactoryException(databasePath_ +
|
||||
" contains DATABASE.LAYOUT.VERSION.MINOR = " +
|
||||
toString(nMinor) + " whereas a number >= " +
|
||||
toString(DATABASE_LAYOUT_VERSION_MINOR) +
|
||||
" is expected. "
|
||||
"It comes from another PROJ installation.");
|
||||
throw FactoryException(
|
||||
databasePath_ +
|
||||
" contains DATABASE.LAYOUT.VERSION.MINOR = " + toString(nMinor) +
|
||||
" whereas a number >= " + toString(DATABASE_LAYOUT_VERSION_MINOR) +
|
||||
" is expected. "
|
||||
"It comes from another PROJ installation.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3933,12 +3933,15 @@ AuthorityFactory::createFromCoordinateReferenceSystemCodes(
|
||||
|
||||
std::string sql;
|
||||
if (discardSuperseded) {
|
||||
sql = "SELECT source_crs_auth_name, source_crs_code, "
|
||||
"target_crs_auth_name, target_crs_code, "
|
||||
sql = "SELECT cov.source_crs_auth_name, cov.source_crs_code, "
|
||||
"cov.target_crs_auth_name, cov.target_crs_code, "
|
||||
"cov.auth_name, cov.code, cov.table_name, "
|
||||
"extent.south_lat, extent.west_lon, extent.north_lat, "
|
||||
"extent.east_lon, "
|
||||
"ss.replacement_auth_name, ss.replacement_code FROM "
|
||||
"ss.replacement_auth_name, ss.replacement_code, "
|
||||
"(gt.auth_name IS NOT NULL) AS replacement_is_grid_transform, "
|
||||
"(ga.proj_grid_name IS NOT NULL) AS replacement_is_known_grid "
|
||||
"FROM "
|
||||
"coordinate_operation_view cov "
|
||||
"JOIN usage ON "
|
||||
"usage.object_table_name = cov.table_name AND "
|
||||
@@ -3953,6 +3956,11 @@ AuthorityFactory::createFromCoordinateReferenceSystemCodes(
|
||||
"ss.superseded_code = cov.code AND "
|
||||
"ss.superseded_table_name = ss.replacement_table_name AND "
|
||||
"ss.same_source_target_crs = 1 "
|
||||
"LEFT JOIN grid_transformation gt ON "
|
||||
"gt.auth_name = ss.replacement_auth_name AND "
|
||||
"gt.code = ss.replacement_code "
|
||||
"LEFT JOIN grid_alternatives ga ON "
|
||||
"ga.original_grid_name = gt.grid_name "
|
||||
"WHERE ";
|
||||
} else {
|
||||
sql = "SELECT source_crs_auth_name, source_crs_code, "
|
||||
@@ -3974,10 +3982,14 @@ AuthorityFactory::createFromCoordinateReferenceSystemCodes(
|
||||
ListOfParams params;
|
||||
if (!sourceCRSAuthName.empty() && !targetCRSAuthName.empty()) {
|
||||
if (tryReverseOrder) {
|
||||
sql += "((source_crs_auth_name = ? AND source_crs_code = ? AND "
|
||||
"target_crs_auth_name = ? AND target_crs_code = ?) OR "
|
||||
"(source_crs_auth_name = ? AND source_crs_code = ? AND "
|
||||
"target_crs_auth_name = ? AND target_crs_code = ?)) AND ";
|
||||
sql += "((cov.source_crs_auth_name = ? AND cov.source_crs_code = ? "
|
||||
"AND "
|
||||
"cov.target_crs_auth_name = ? AND cov.target_crs_code = ?) "
|
||||
"OR "
|
||||
"(cov.source_crs_auth_name = ? AND cov.source_crs_code = ? "
|
||||
"AND "
|
||||
"cov.target_crs_auth_name = ? AND cov.target_crs_code = ?)) "
|
||||
"AND ";
|
||||
params.emplace_back(sourceCRSAuthName);
|
||||
params.emplace_back(sourceCRSCode);
|
||||
params.emplace_back(targetCRSAuthName);
|
||||
@@ -3987,8 +3999,10 @@ AuthorityFactory::createFromCoordinateReferenceSystemCodes(
|
||||
params.emplace_back(sourceCRSAuthName);
|
||||
params.emplace_back(sourceCRSCode);
|
||||
} else {
|
||||
sql += "source_crs_auth_name = ? AND source_crs_code = ? AND "
|
||||
"target_crs_auth_name = ? AND target_crs_code = ? AND ";
|
||||
sql += "cov.source_crs_auth_name = ? AND cov.source_crs_code = ? "
|
||||
"AND "
|
||||
"cov.target_crs_auth_name = ? AND cov.target_crs_code = ? "
|
||||
"AND ";
|
||||
params.emplace_back(sourceCRSAuthName);
|
||||
params.emplace_back(sourceCRSCode);
|
||||
params.emplace_back(targetCRSAuthName);
|
||||
@@ -3996,27 +4010,33 @@ AuthorityFactory::createFromCoordinateReferenceSystemCodes(
|
||||
}
|
||||
} else if (!sourceCRSAuthName.empty()) {
|
||||
if (tryReverseOrder) {
|
||||
sql += "((source_crs_auth_name = ? AND source_crs_code = ?) OR "
|
||||
"(target_crs_auth_name = ? AND target_crs_code = ?)) AND ";
|
||||
sql += "((cov.source_crs_auth_name = ? AND cov.source_crs_code = ? "
|
||||
")OR "
|
||||
"(cov.target_crs_auth_name = ? AND cov.target_crs_code = ?))"
|
||||
" AND ";
|
||||
params.emplace_back(sourceCRSAuthName);
|
||||
params.emplace_back(sourceCRSCode);
|
||||
params.emplace_back(sourceCRSAuthName);
|
||||
params.emplace_back(sourceCRSCode);
|
||||
} else {
|
||||
sql += "source_crs_auth_name = ? AND source_crs_code = ? AND ";
|
||||
sql += "cov.source_crs_auth_name = ? AND cov.source_crs_code = ? "
|
||||
"AND ";
|
||||
params.emplace_back(sourceCRSAuthName);
|
||||
params.emplace_back(sourceCRSCode);
|
||||
}
|
||||
} else if (!targetCRSAuthName.empty()) {
|
||||
if (tryReverseOrder) {
|
||||
sql += "((source_crs_auth_name = ? AND source_crs_code = ?) OR "
|
||||
"(target_crs_auth_name = ? AND target_crs_code = ?)) AND ";
|
||||
sql += "((cov.source_crs_auth_name = ? AND cov.source_crs_code = ?)"
|
||||
" OR "
|
||||
"(cov.target_crs_auth_name = ? AND cov.target_crs_code = ?))"
|
||||
" AND ";
|
||||
params.emplace_back(targetCRSAuthName);
|
||||
params.emplace_back(targetCRSCode);
|
||||
params.emplace_back(targetCRSAuthName);
|
||||
params.emplace_back(targetCRSCode);
|
||||
} else {
|
||||
sql += "target_crs_auth_name = ? AND target_crs_code = ? AND ";
|
||||
sql += "cov.target_crs_auth_name = ? AND cov.target_crs_code = ? "
|
||||
"AND ";
|
||||
params.emplace_back(targetCRSAuthName);
|
||||
params.emplace_back(targetCRSCode);
|
||||
}
|
||||
@@ -4028,7 +4048,7 @@ AuthorityFactory::createFromCoordinateReferenceSystemCodes(
|
||||
}
|
||||
sql += " ORDER BY pseudo_area_from_swne(south_lat, west_lon, north_lat, "
|
||||
"east_lon) DESC, "
|
||||
"(CASE WHEN accuracy is NULL THEN 1 ELSE 0 END), accuracy";
|
||||
"(CASE WHEN cov.accuracy is NULL THEN 1 ELSE 0 END), cov.accuracy";
|
||||
auto res = d->run(sql, params);
|
||||
std::set<std::pair<std::string, std::string>> setTransf;
|
||||
if (discardSuperseded) {
|
||||
@@ -4052,7 +4072,12 @@ AuthorityFactory::createFromCoordinateReferenceSystemCodes(
|
||||
if (discardSuperseded) {
|
||||
const auto &replacement_auth_name = row[11];
|
||||
const auto &replacement_code = row[12];
|
||||
const bool replacement_is_grid_transform = row[13] == "1";
|
||||
const bool replacement_is_known_grid = row[14] == "1";
|
||||
if (!replacement_auth_name.empty() &&
|
||||
// Ignore supersession if the replacement uses a unknown grid
|
||||
!(replacement_is_grid_transform &&
|
||||
!replacement_is_known_grid) &&
|
||||
setTransf.find(std::pair<std::string, std::string>(
|
||||
replacement_auth_name, replacement_code)) !=
|
||||
setTransf.end()) {
|
||||
@@ -4105,7 +4130,12 @@ AuthorityFactory::createFromCoordinateReferenceSystemCodes(
|
||||
if (discardSuperseded) {
|
||||
const auto &replacement_auth_name = row[11];
|
||||
const auto &replacement_code = row[12];
|
||||
const bool replacement_is_grid_transform = row[13] == "1";
|
||||
const bool replacement_is_known_grid = row[14] == "1";
|
||||
if (!replacement_auth_name.empty() &&
|
||||
// Ignore supersession if the replacement uses a unknown grid
|
||||
!(replacement_is_grid_transform &&
|
||||
!replacement_is_known_grid) &&
|
||||
setTransf.find(std::pair<std::string, std::string>(
|
||||
replacement_auth_name, replacement_code)) !=
|
||||
setTransf.end()) {
|
||||
@@ -4243,6 +4273,22 @@ AuthorityFactory::createFromCRSCodesWithIntermediates(
|
||||
return listTmp;
|
||||
}
|
||||
|
||||
const auto CheckIfHasOperations = [=](const std::string &auth_name,
|
||||
const std::string &code) {
|
||||
return !(d->run("SELECT 1 FROM coordinate_operation_view WHERE "
|
||||
"(source_crs_auth_name = ? AND source_crs_code = ?) OR "
|
||||
"(target_crs_auth_name = ? AND target_crs_code = ?)",
|
||||
{auth_name, code, auth_name, code})
|
||||
.empty());
|
||||
};
|
||||
|
||||
// If the source or target CRS are not the source or target of an operation,
|
||||
// do not run the next costly requests.
|
||||
if (!CheckIfHasOperations(sourceCRSAuthName, sourceCRSCode) ||
|
||||
!CheckIfHasOperations(targetCRSAuthName, targetCRSCode)) {
|
||||
return listTmp;
|
||||
}
|
||||
|
||||
const std::string sqlProlog(
|
||||
discardSuperseded
|
||||
?
|
||||
@@ -4322,8 +4368,9 @@ AuthorityFactory::createFromCRSCodesWithIntermediates(
|
||||
|
||||
// Case (source->intermediate) and (intermediate->target)
|
||||
std::string sql(
|
||||
sqlProlog + "ON v1.target_crs_auth_name = v2.source_crs_auth_name "
|
||||
"AND v1.target_crs_code = v2.source_crs_code " +
|
||||
sqlProlog +
|
||||
"ON v1.target_crs_auth_name = v2.source_crs_auth_name "
|
||||
"AND v1.target_crs_code = v2.source_crs_code " +
|
||||
joinArea +
|
||||
"WHERE v1.source_crs_auth_name = ? AND v1.source_crs_code = ? "
|
||||
"AND v2.target_crs_auth_name = ? AND v2.target_crs_code = ? ");
|
||||
@@ -4432,24 +4479,25 @@ AuthorityFactory::createFromCRSCodesWithIntermediates(
|
||||
}
|
||||
}
|
||||
|
||||
const auto buildIntermediateWhere = [&intermediateCRSAuthCodes](
|
||||
const std::string &first_field, const std::string &second_field) {
|
||||
if (intermediateCRSAuthCodes.empty()) {
|
||||
return std::string();
|
||||
}
|
||||
std::string l_sql(" AND (");
|
||||
for (size_t i = 0; i < intermediateCRSAuthCodes.size(); ++i) {
|
||||
if (i > 0) {
|
||||
l_sql += " OR";
|
||||
const auto buildIntermediateWhere =
|
||||
[&intermediateCRSAuthCodes](const std::string &first_field,
|
||||
const std::string &second_field) {
|
||||
if (intermediateCRSAuthCodes.empty()) {
|
||||
return std::string();
|
||||
}
|
||||
l_sql += "(v1." + first_field + "_crs_auth_name = ? AND ";
|
||||
l_sql += "v1." + first_field + "_crs_code = ? AND ";
|
||||
l_sql += "v2." + second_field + "_crs_auth_name = ? AND ";
|
||||
l_sql += "v2." + second_field + "_crs_code = ?) ";
|
||||
}
|
||||
l_sql += ')';
|
||||
return l_sql;
|
||||
};
|
||||
std::string l_sql(" AND (");
|
||||
for (size_t i = 0; i < intermediateCRSAuthCodes.size(); ++i) {
|
||||
if (i > 0) {
|
||||
l_sql += " OR";
|
||||
}
|
||||
l_sql += "(v1." + first_field + "_crs_auth_name = ? AND ";
|
||||
l_sql += "v1." + first_field + "_crs_code = ? AND ";
|
||||
l_sql += "v2." + second_field + "_crs_auth_name = ? AND ";
|
||||
l_sql += "v2." + second_field + "_crs_code = ?) ";
|
||||
}
|
||||
l_sql += ')';
|
||||
return l_sql;
|
||||
};
|
||||
|
||||
std::string intermediateWhere = buildIntermediateWhere("target", "source");
|
||||
for (const auto &pair : intermediateCRSAuthCodes) {
|
||||
@@ -4537,8 +4585,9 @@ AuthorityFactory::createFromCRSCodesWithIntermediates(
|
||||
}
|
||||
|
||||
// Case (source->intermediate) and (target->intermediate)
|
||||
sql = sqlProlog + "ON v1.target_crs_auth_name = v2.target_crs_auth_name "
|
||||
"AND v1.target_crs_code = v2.target_crs_code " +
|
||||
sql = sqlProlog +
|
||||
"ON v1.target_crs_auth_name = v2.target_crs_auth_name "
|
||||
"AND v1.target_crs_code = v2.target_crs_code " +
|
||||
joinArea +
|
||||
"WHERE v1.source_crs_auth_name = ? AND v1.source_crs_code = ? "
|
||||
"AND v2.source_crs_auth_name = ? AND v2.source_crs_code = ? ";
|
||||
@@ -4580,8 +4629,9 @@ AuthorityFactory::createFromCRSCodesWithIntermediates(
|
||||
}
|
||||
|
||||
// Case (intermediate->source) and (intermediate->target)
|
||||
sql = sqlProlog + "ON v1.source_crs_auth_name = v2.source_crs_auth_name "
|
||||
"AND v1.source_crs_code = v2.source_crs_code " +
|
||||
sql = sqlProlog +
|
||||
"ON v1.source_crs_auth_name = v2.source_crs_auth_name "
|
||||
"AND v1.source_crs_code = v2.source_crs_code " +
|
||||
joinArea +
|
||||
"WHERE v1.target_crs_auth_name = ? AND v1.target_crs_code = ? "
|
||||
"AND v2.target_crs_auth_name = ? AND v2.target_crs_code = ? ";
|
||||
@@ -4644,8 +4694,9 @@ AuthorityFactory::createFromCRSCodesWithIntermediates(
|
||||
}
|
||||
|
||||
// Case (intermediate->source) and (target->intermediate)
|
||||
sql = sqlProlog + "ON v1.source_crs_auth_name = v2.target_crs_auth_name "
|
||||
"AND v1.source_crs_code = v2.target_crs_code " +
|
||||
sql = sqlProlog +
|
||||
"ON v1.source_crs_auth_name = v2.target_crs_auth_name "
|
||||
"AND v1.source_crs_code = v2.target_crs_code " +
|
||||
joinArea +
|
||||
"WHERE v1.target_crs_auth_name = ? AND v1.target_crs_code = ? "
|
||||
"AND v2.source_crs_auth_name = ? AND v2.source_crs_code = ? ";
|
||||
@@ -4718,12 +4769,17 @@ AuthorityFactory::createBetweenGeodeticCRSWithDatumBasedIntermediates(
|
||||
sourceCRSCode == targetCRSCode) {
|
||||
return listTmp;
|
||||
}
|
||||
const auto sourceGeodCRS =
|
||||
dynamic_cast<crs::GeodeticCRS *>(sourceCRS.get());
|
||||
const auto targetGeodCRS =
|
||||
dynamic_cast<crs::GeodeticCRS *>(targetCRS.get());
|
||||
if (!sourceGeodCRS || !targetGeodCRS) {
|
||||
return listTmp;
|
||||
}
|
||||
|
||||
std::string minDate;
|
||||
const auto &sourceDatum =
|
||||
dynamic_cast<crs::GeodeticCRS *>(sourceCRS.get())->datum();
|
||||
const auto &targetDatum =
|
||||
dynamic_cast<crs::GeodeticCRS *>(targetCRS.get())->datum();
|
||||
const auto &sourceDatum = sourceGeodCRS->datum();
|
||||
const auto &targetDatum = targetGeodCRS->datum();
|
||||
if (sourceDatum && sourceDatum->publicationDate().has_value() &&
|
||||
targetDatum && targetDatum->publicationDate().has_value()) {
|
||||
const auto sourceDate(sourceDatum->publicationDate()->toString());
|
||||
@@ -4871,7 +4927,6 @@ AuthorityFactory::createBetweenGeodeticCRSWithDatumBasedIntermediates(
|
||||
|
||||
const auto filterDeprecatedAndNotMatchingAuth =
|
||||
[&](SQLResultSet &&resultSet) {
|
||||
|
||||
SQLResultSet filteredResultSet;
|
||||
for (const auto &row : resultSet) {
|
||||
const auto &deprecated1 = row[3];
|
||||
@@ -4930,9 +4985,11 @@ AuthorityFactory::createBetweenGeodeticCRSWithDatumBasedIntermediates(
|
||||
ListOfParams findSupersededParams;
|
||||
|
||||
std::set<std::string> setAlreadyAsked;
|
||||
const auto keyMapSupersession = [](
|
||||
const std::string &table_name, const std::string &auth_name,
|
||||
const std::string &code) { return table_name + auth_name + code; };
|
||||
const auto keyMapSupersession = [](const std::string &table_name,
|
||||
const std::string &auth_name,
|
||||
const std::string &code) {
|
||||
return table_name + auth_name + code;
|
||||
};
|
||||
|
||||
for (const auto &row : resultSet) {
|
||||
const auto &table1 = row[0];
|
||||
@@ -5585,18 +5642,21 @@ AuthorityFactory::getDescriptionText(const std::string &code) const {
|
||||
*/
|
||||
std::list<AuthorityFactory::CRSInfo> AuthorityFactory::getCRSInfoList() const {
|
||||
|
||||
const auto getSqlArea = [](const std::string &table_name) {
|
||||
return "JOIN usage u ON "
|
||||
"u.object_table_name = '" +
|
||||
table_name + "' AND "
|
||||
"u.object_auth_name = c.auth_name AND "
|
||||
"u.object_code = c.code "
|
||||
"JOIN extent a "
|
||||
"ON a.auth_name = u.extent_auth_name AND "
|
||||
"a.code = u.extent_code ";
|
||||
const auto getSqlArea = [](const char* table_name) {
|
||||
std::string sql(
|
||||
"JOIN usage u ON u.object_table_name = '");
|
||||
sql += table_name;
|
||||
sql += "' AND "
|
||||
"u.object_auth_name = c.auth_name AND "
|
||||
"u.object_code = c.code "
|
||||
"JOIN extent a "
|
||||
"ON a.auth_name = u.extent_auth_name AND "
|
||||
"a.code = u.extent_code ";
|
||||
return sql;
|
||||
};
|
||||
|
||||
std::string sql = "SELECT c.auth_name, c.code, c.name, c.type, "
|
||||
std::string sql = "SELECT * FROM ("
|
||||
"SELECT c.auth_name, c.code, c.name, c.type, "
|
||||
"c.deprecated, "
|
||||
"a.west_lon, a.south_lat, a.east_lon, a.north_lat, "
|
||||
"a.description, NULL FROM geodetic_crs c " +
|
||||
@@ -5611,9 +5671,9 @@ std::list<AuthorityFactory::CRSInfo> AuthorityFactory::getCRSInfoList() const {
|
||||
"c.deprecated, "
|
||||
"a.west_lon, a.south_lat, a.east_lon, a.north_lat, "
|
||||
"a.description, cm.name AS conversion_method_name FROM "
|
||||
"projected_crs c " +
|
||||
getSqlArea("projected_crs") +
|
||||
"LEFT JOIN conversion_table conv ON "
|
||||
"projected_crs c ";
|
||||
sql += getSqlArea("projected_crs");
|
||||
sql += "LEFT JOIN conversion_table conv ON "
|
||||
"c.conversion_auth_name = conv.auth_name AND "
|
||||
"c.conversion_code = conv.code "
|
||||
"LEFT JOIN conversion_method cm ON "
|
||||
@@ -5627,8 +5687,8 @@ std::list<AuthorityFactory::CRSInfo> AuthorityFactory::getCRSInfoList() const {
|
||||
sql += "SELECT c.auth_name, c.code, c.name, 'vertical', "
|
||||
"c.deprecated, "
|
||||
"a.west_lon, a.south_lat, a.east_lon, a.north_lat, "
|
||||
"a.description, NULL FROM vertical_crs c " +
|
||||
getSqlArea("vertical_crs");
|
||||
"a.description, NULL FROM vertical_crs c ";
|
||||
sql += getSqlArea("vertical_crs");
|
||||
if (d->hasAuthorityRestriction()) {
|
||||
sql += " WHERE c.auth_name = ?";
|
||||
params.emplace_back(d->authority());
|
||||
@@ -5637,12 +5697,13 @@ std::list<AuthorityFactory::CRSInfo> AuthorityFactory::getCRSInfoList() const {
|
||||
sql += "SELECT c.auth_name, c.code, c.name, 'compound', "
|
||||
"c.deprecated, "
|
||||
"a.west_lon, a.south_lat, a.east_lon, a.north_lat, "
|
||||
"a.description, NULL FROM compound_crs c " +
|
||||
getSqlArea("compound_crs");
|
||||
"a.description, NULL FROM compound_crs c ";
|
||||
sql += getSqlArea("compound_crs");
|
||||
if (d->hasAuthorityRestriction()) {
|
||||
sql += " WHERE c.auth_name = ?";
|
||||
params.emplace_back(d->authority());
|
||||
}
|
||||
sql += ") r ORDER BY auth_name, code";
|
||||
auto sqlRes = d->run(sql, params);
|
||||
std::list<AuthorityFactory::CRSInfo> res;
|
||||
for (const auto &row : sqlRes) {
|
||||
@@ -6258,8 +6319,9 @@ AuthorityFactory::createObjectsFromNameEx(
|
||||
}
|
||||
auto factory = d->createFactory(auth_name);
|
||||
auto getObject = [&factory, datumEnsembleAllowed](
|
||||
const std::string &l_table_name,
|
||||
const std::string &l_code) -> common::IdentifiedObjectNNPtr {
|
||||
const std::string &l_table_name,
|
||||
const std::string &l_code)
|
||||
-> common::IdentifiedObjectNNPtr {
|
||||
if (l_table_name == "prime_meridian") {
|
||||
return factory->createPrimeMeridian(l_code);
|
||||
} else if (l_table_name == "ellipsoid") {
|
||||
|
||||
+65
-63
@@ -916,9 +916,9 @@ struct WKTNode::Private {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const WKTNodeNNPtr &WKTNode::Private::lookForChild(const std::string &childName,
|
||||
int occurrence) const
|
||||
noexcept {
|
||||
const WKTNodeNNPtr &
|
||||
WKTNode::Private::lookForChild(const std::string &childName,
|
||||
int occurrence) const noexcept {
|
||||
int occCount = 0;
|
||||
for (const auto &child : children_) {
|
||||
if (ci_equal(child->GP()->value(), childName)) {
|
||||
@@ -3408,8 +3408,8 @@ ConversionNNPtr WKTParser::Private::buildProjectionFromESRI(
|
||||
}
|
||||
|
||||
struct ci_less_struct {
|
||||
bool operator()(const std::string &lhs, const std::string &rhs) const
|
||||
noexcept {
|
||||
bool operator()(const std::string &lhs,
|
||||
const std::string &rhs) const noexcept {
|
||||
return ci_less(lhs, rhs);
|
||||
}
|
||||
};
|
||||
@@ -3750,14 +3750,12 @@ ConversionNNPtr WKTParser::Private::buildProjectionStandard(
|
||||
// Krovak East-North Oriented methods
|
||||
if (ci_equal(projectionName, "Krovak") &&
|
||||
projCRSNode->countChildrenOfName(WKTConstants::AXIS) == 2 &&
|
||||
&buildAxis(
|
||||
projCRSNode->GP()->lookForChild(WKTConstants::AXIS, 0),
|
||||
defaultLinearUnit, UnitOfMeasure::Type::LINEAR, false,
|
||||
1)->direction() == &AxisDirection::SOUTH &&
|
||||
&buildAxis(
|
||||
projCRSNode->GP()->lookForChild(WKTConstants::AXIS, 1),
|
||||
defaultLinearUnit, UnitOfMeasure::Type::LINEAR, false,
|
||||
2)->direction() == &AxisDirection::WEST) {
|
||||
&buildAxis(projCRSNode->GP()->lookForChild(WKTConstants::AXIS, 0),
|
||||
defaultLinearUnit, UnitOfMeasure::Type::LINEAR, false, 1)
|
||||
->direction() == &AxisDirection::SOUTH &&
|
||||
&buildAxis(projCRSNode->GP()->lookForChild(WKTConstants::AXIS, 1),
|
||||
defaultLinearUnit, UnitOfMeasure::Type::LINEAR, false, 2)
|
||||
->direction() == &AxisDirection::WEST) {
|
||||
mapping = getMapping(EPSG_CODE_METHOD_KROVAK);
|
||||
}
|
||||
|
||||
@@ -6442,50 +6440,52 @@ static BaseObjectNNPtr createFromUserInput(const std::string &text,
|
||||
auto factory =
|
||||
AuthorityFactory::create(NN_NO_CHECK(dbContext), std::string());
|
||||
|
||||
const auto searchObject = [&factory](
|
||||
const std::string &objectName, bool approximateMatch,
|
||||
const std::vector<AuthorityFactory::ObjectType> &objectTypes,
|
||||
bool &goOn) {
|
||||
constexpr size_t limitResultCount = 10;
|
||||
auto res = factory->createObjectsFromName(
|
||||
objectName, objectTypes, approximateMatch, limitResultCount);
|
||||
if (res.size() == 1) {
|
||||
return res.front();
|
||||
}
|
||||
if (res.size() > 1) {
|
||||
if (objectTypes.size() == 1 &&
|
||||
objectTypes[0] == AuthorityFactory::ObjectType::CRS) {
|
||||
for (size_t ndim = 2; ndim <= 3; ndim++) {
|
||||
for (const auto &obj : res) {
|
||||
auto crs =
|
||||
dynamic_cast<crs::GeographicCRS *>(obj.get());
|
||||
if (crs &&
|
||||
crs->coordinateSystem()->axisList().size() ==
|
||||
ndim) {
|
||||
return obj;
|
||||
const auto searchObject =
|
||||
[&factory](
|
||||
const std::string &objectName, bool approximateMatch,
|
||||
const std::vector<AuthorityFactory::ObjectType> &objectTypes,
|
||||
bool &goOn) {
|
||||
constexpr size_t limitResultCount = 10;
|
||||
auto res = factory->createObjectsFromName(
|
||||
objectName, objectTypes, approximateMatch,
|
||||
limitResultCount);
|
||||
if (res.size() == 1) {
|
||||
return res.front();
|
||||
}
|
||||
if (res.size() > 1) {
|
||||
if (objectTypes.size() == 1 &&
|
||||
objectTypes[0] == AuthorityFactory::ObjectType::CRS) {
|
||||
for (size_t ndim = 2; ndim <= 3; ndim++) {
|
||||
for (const auto &obj : res) {
|
||||
auto crs = dynamic_cast<crs::GeographicCRS *>(
|
||||
obj.get());
|
||||
if (crs && crs->coordinateSystem()
|
||||
->axisList()
|
||||
.size() == ndim) {
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string msg("several objects matching this name: ");
|
||||
bool first = true;
|
||||
for (const auto &obj : res) {
|
||||
if (msg.size() > 200) {
|
||||
msg += ", ...";
|
||||
break;
|
||||
std::string msg("several objects matching this name: ");
|
||||
bool first = true;
|
||||
for (const auto &obj : res) {
|
||||
if (msg.size() > 200) {
|
||||
msg += ", ...";
|
||||
break;
|
||||
}
|
||||
if (!first) {
|
||||
msg += ", ";
|
||||
}
|
||||
first = false;
|
||||
msg += obj->nameStr();
|
||||
}
|
||||
if (!first) {
|
||||
msg += ", ";
|
||||
}
|
||||
first = false;
|
||||
msg += obj->nameStr();
|
||||
throw ParsingException(msg);
|
||||
}
|
||||
throw ParsingException(msg);
|
||||
}
|
||||
goOn = true;
|
||||
throw ParsingException("dummy");
|
||||
};
|
||||
goOn = true;
|
||||
throw ParsingException("dummy");
|
||||
};
|
||||
|
||||
const auto searchCRS = [&searchObject](const std::string &objectName) {
|
||||
bool goOn = false;
|
||||
@@ -6808,7 +6808,9 @@ WKTParser::guessDialect(const std::string &wkt) noexcept {
|
||||
}
|
||||
}
|
||||
static const char *const wkt2_2019_only_substrings[] = {
|
||||
"CS[TemporalDateTime,", "CS[TemporalCount,", "CS[TemporalMeasure,",
|
||||
"CS[TemporalDateTime,",
|
||||
"CS[TemporalCount,",
|
||||
"CS[TemporalMeasure,",
|
||||
};
|
||||
for (const auto &substrings : wkt2_2019_only_substrings) {
|
||||
if (ci_find(wkt, substrings) != std::string::npos) {
|
||||
@@ -9086,7 +9088,7 @@ static double getNumericValue(const std::string ¶mValue,
|
||||
// ---------------------------------------------------------------------------
|
||||
namespace {
|
||||
template <class T> inline void ignoreRetVal(T) {}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
GeographicCRSNNPtr PROJStringParser::Private::buildGeographicCRS(
|
||||
int iStep, int iUnitConvert, int iAxisSwap, bool ignorePROJAxis) {
|
||||
@@ -10097,9 +10099,8 @@ PROJStringParser::createFromPROJString(const std::string &projString) {
|
||||
} else {
|
||||
for (auto cur = pj->params; cur; cur = cur->next) {
|
||||
const char *equal = strchr(cur->param, '=');
|
||||
if (equal &&
|
||||
static_cast<size_t>(equal - cur->param) ==
|
||||
kv.key.size()) {
|
||||
if (equal && static_cast<size_t>(equal - cur->param) ==
|
||||
kv.key.size()) {
|
||||
if (memcmp(cur->param, kv.key.c_str(), kv.key.size()) ==
|
||||
0) {
|
||||
recognizedByPROJ = (cur->used == 1);
|
||||
@@ -10197,13 +10198,14 @@ PROJStringParser::createFromPROJString(const std::string &projString) {
|
||||
iProjStep,
|
||||
d->buildProjectedCRS(
|
||||
iProjStep,
|
||||
d->buildGeographicCRS(
|
||||
iFirstGeogStep, iFirstUnitConvert < iFirstGeogStep
|
||||
? iFirstUnitConvert
|
||||
: -1,
|
||||
iFirstAxisSwap < iFirstGeogStep ? iFirstAxisSwap
|
||||
: -1,
|
||||
true),
|
||||
d->buildGeographicCRS(iFirstGeogStep,
|
||||
iFirstUnitConvert < iFirstGeogStep
|
||||
? iFirstUnitConvert
|
||||
: -1,
|
||||
iFirstAxisSwap < iFirstGeogStep
|
||||
? iFirstAxisSwap
|
||||
: -1,
|
||||
true),
|
||||
iFirstUnitConvert < iFirstGeogStep ? iSecondUnitConvert
|
||||
: iFirstUnitConvert,
|
||||
iFirstAxisSwap < iFirstGeogStep ? iSecondAxisSwap
|
||||
|
||||
@@ -321,7 +321,8 @@ void ConcatenatedOperation::fixStepsDirection(
|
||||
if (l_sourceCRS) {
|
||||
derivedCRS = dynamic_cast<const crs::DerivedCRS *>(
|
||||
l_sourceCRS.get());
|
||||
if (conv->isEquivalentTo(
|
||||
if (derivedCRS &&
|
||||
conv->isEquivalentTo(
|
||||
derivedCRS->derivingConversion().get(),
|
||||
util::IComparable::Criterion::EQUIVALENT)) {
|
||||
op->setCRSs(concatOpTargetCRS, NN_NO_CHECK(l_sourceCRS),
|
||||
|
||||
@@ -2238,15 +2238,16 @@ ConversionNNPtr Conversion::createPoleRotationGRIBConvention(
|
||||
ConversionNNPtr
|
||||
Conversion::createChangeVerticalUnit(const util::PropertyMap &properties,
|
||||
const common::Scale &factor) {
|
||||
return create(properties, createMethodMapNameEPSGCode(
|
||||
EPSG_CODE_METHOD_CHANGE_VERTICAL_UNIT),
|
||||
VectorOfParameters{
|
||||
createOpParamNameEPSGCode(
|
||||
EPSG_CODE_PARAMETER_UNIT_CONVERSION_SCALAR),
|
||||
},
|
||||
VectorOfValues{
|
||||
factor,
|
||||
});
|
||||
return create(
|
||||
properties,
|
||||
createMethodMapNameEPSGCode(EPSG_CODE_METHOD_CHANGE_VERTICAL_UNIT),
|
||||
VectorOfParameters{
|
||||
createOpParamNameEPSGCode(
|
||||
EPSG_CODE_PARAMETER_UNIT_CONVERSION_SCALAR),
|
||||
},
|
||||
VectorOfValues{
|
||||
factor,
|
||||
});
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -2264,9 +2265,10 @@ Conversion::createChangeVerticalUnit(const util::PropertyMap &properties,
|
||||
*/
|
||||
ConversionNNPtr
|
||||
Conversion::createHeightDepthReversal(const util::PropertyMap &properties) {
|
||||
return create(properties, createMethodMapNameEPSGCode(
|
||||
EPSG_CODE_METHOD_HEIGHT_DEPTH_REVERSAL),
|
||||
{}, {});
|
||||
return create(
|
||||
properties,
|
||||
createMethodMapNameEPSGCode(EPSG_CODE_METHOD_HEIGHT_DEPTH_REVERSAL), {},
|
||||
{});
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -2310,9 +2312,10 @@ ConversionNNPtr Conversion::createAxisOrderReversal(bool is3D) {
|
||||
*/
|
||||
ConversionNNPtr
|
||||
Conversion::createGeographicGeocentric(const util::PropertyMap &properties) {
|
||||
return create(properties, createMethodMapNameEPSGCode(
|
||||
EPSG_CODE_METHOD_GEOGRAPHIC_GEOCENTRIC),
|
||||
{}, {});
|
||||
return create(
|
||||
properties,
|
||||
createMethodMapNameEPSGCode(EPSG_CODE_METHOD_GEOGRAPHIC_GEOCENTRIC), {},
|
||||
{});
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -2458,9 +2461,10 @@ static double lcc_1sp_to_2sp_f(double sinphi, double K, double ec, double n) {
|
||||
const double x = sinphi;
|
||||
const double ecx = ec * x;
|
||||
return (1 - x * x) / (1 - ecx * ecx) -
|
||||
K * K * std::pow((1.0 - x) / (1.0 + x) *
|
||||
std::pow((1.0 + ecx) / (1.0 - ecx), ec),
|
||||
n);
|
||||
K * K *
|
||||
std::pow((1.0 - x) / (1.0 + x) *
|
||||
std::pow((1.0 + ecx) / (1.0 - ecx), ec),
|
||||
n);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -2748,8 +2752,9 @@ ConversionPtr Conversion::convertToOtherMethod(int targetEPSGCode) const {
|
||||
common::Angle(phi0Deg, common::UnitOfMeasure::DEGREE),
|
||||
common::Angle(parameterValueMeasure(
|
||||
EPSG_CODE_PARAMETER_LONGITUDE_FALSE_ORIGIN)),
|
||||
common::Scale(k0), common::Length(parameterValueMeasure(
|
||||
EPSG_CODE_PARAMETER_EASTING_FALSE_ORIGIN)),
|
||||
common::Scale(k0),
|
||||
common::Length(parameterValueMeasure(
|
||||
EPSG_CODE_PARAMETER_EASTING_FALSE_ORIGIN)),
|
||||
common::Length(
|
||||
parameterValueNumericAsSI(
|
||||
EPSG_CODE_PARAMETER_NORTHING_FALSE_ORIGIN) +
|
||||
|
||||
@@ -50,7 +50,6 @@ struct CoordinateOperation::Private {
|
||||
util::optional<common::DataEpoch> sourceCoordinateEpoch_{};
|
||||
util::optional<common::DataEpoch> targetCoordinateEpoch_{};
|
||||
bool hasBallparkTransformation_ = false;
|
||||
bool use3DHelmert_ = false;
|
||||
|
||||
// do not set this for a ProjectedCRS.definingConversion
|
||||
struct CRSStrongRef {
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#define FROM_PROJ_CPP
|
||||
#endif
|
||||
|
||||
#include "proj/coordinateoperation.hpp"
|
||||
#include "proj/common.hpp"
|
||||
#include "proj/coordinateoperation.hpp"
|
||||
#include "proj/crs.hpp"
|
||||
#include "proj/io.hpp"
|
||||
#include "proj/metadata.hpp"
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "proj.h"
|
||||
#include "proj_internal.h" // M_PI
|
||||
// clang-format on
|
||||
#include "proj_constants.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
@@ -1856,14 +1857,14 @@ createBallparkGeographicOffset(const crs::CRSNNPtr &sourceCRS,
|
||||
accuracies.emplace_back(metadata::PositionalAccuracy::create("0"));
|
||||
}
|
||||
|
||||
if (dynamic_cast<const crs::SingleCRS *>(sourceCRS.get())
|
||||
->coordinateSystem()
|
||||
->axisList()
|
||||
.size() == 3 ||
|
||||
dynamic_cast<const crs::SingleCRS *>(targetCRS.get())
|
||||
->coordinateSystem()
|
||||
->axisList()
|
||||
.size() == 3) {
|
||||
const auto singleSourceCRS =
|
||||
dynamic_cast<const crs::SingleCRS *>(sourceCRS.get());
|
||||
const auto singleTargetCRS =
|
||||
dynamic_cast<const crs::SingleCRS *>(targetCRS.get());
|
||||
if ((singleSourceCRS &&
|
||||
singleSourceCRS->coordinateSystem()->axisList().size() == 3) ||
|
||||
(singleTargetCRS &&
|
||||
singleTargetCRS->coordinateSystem()->axisList().size() == 3)) {
|
||||
return Transformation::createGeographic3DOffsets(
|
||||
map, sourceCRS, targetCRS, angle0, angle0, common::Length(0),
|
||||
accuracies);
|
||||
@@ -1892,8 +1893,8 @@ struct MyPROJStringExportableGeodToGeod final
|
||||
~MyPROJStringExportableGeodToGeod() override;
|
||||
|
||||
void
|
||||
// cppcheck-suppress functionStatic
|
||||
_exportToPROJString(io::PROJStringFormatter *formatter) const override {
|
||||
// cppcheck-suppress functionStatic
|
||||
_exportToPROJString(io::PROJStringFormatter *formatter) const override {
|
||||
|
||||
formatter->startInversion();
|
||||
geodSrc->_exportToPROJString(formatter);
|
||||
@@ -1922,8 +1923,8 @@ struct MyPROJStringExportableHorizVertical final
|
||||
~MyPROJStringExportableHorizVertical() override;
|
||||
|
||||
void
|
||||
// cppcheck-suppress functionStatic
|
||||
_exportToPROJString(io::PROJStringFormatter *formatter) const override {
|
||||
// cppcheck-suppress functionStatic
|
||||
_exportToPROJString(io::PROJStringFormatter *formatter) const override {
|
||||
|
||||
formatter->pushOmitZUnitConversion();
|
||||
|
||||
@@ -1970,8 +1971,67 @@ struct MyPROJStringExportableHorizVerticalHorizPROJBased final
|
||||
~MyPROJStringExportableHorizVerticalHorizPROJBased() override;
|
||||
|
||||
void
|
||||
// cppcheck-suppress functionStatic
|
||||
_exportToPROJString(io::PROJStringFormatter *formatter) const override {
|
||||
// cppcheck-suppress functionStatic
|
||||
_exportToPROJString(io::PROJStringFormatter *formatter) const override {
|
||||
|
||||
bool saveHorizontalCoords = false;
|
||||
const auto transf =
|
||||
dynamic_cast<Transformation *>(opSrcCRSToGeogCRS.get());
|
||||
if (transf && opSrcCRSToGeogCRS->sourceCRS()->_isEquivalentTo(
|
||||
opGeogCRStoDstCRS->targetCRS()
|
||||
->demoteTo2D(std::string(), nullptr)
|
||||
.get(),
|
||||
util::IComparable::Criterion::EQUIVALENT)) {
|
||||
const int methodEPSGCode = transf->method()->getEPSGCode();
|
||||
|
||||
const bool bGeocentricTranslation =
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_GEOCENTRIC_TRANSLATION_GEOCENTRIC ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_GEOCENTRIC_TRANSLATION_GEOGRAPHIC_2D ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_GEOCENTRIC_TRANSLATION_GEOGRAPHIC_3D;
|
||||
|
||||
if ((bGeocentricTranslation &&
|
||||
!(transf->parameterValueNumericAsSI(
|
||||
EPSG_CODE_PARAMETER_X_AXIS_TRANSLATION) == 0 &&
|
||||
transf->parameterValueNumericAsSI(
|
||||
EPSG_CODE_PARAMETER_Y_AXIS_TRANSLATION) == 0 &&
|
||||
transf->parameterValueNumericAsSI(
|
||||
EPSG_CODE_PARAMETER_Z_AXIS_TRANSLATION) == 0)) ||
|
||||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_COORDINATE_FRAME_GEOCENTRIC ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_COORDINATE_FRAME_GEOGRAPHIC_2D ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_COORDINATE_FRAME_GEOGRAPHIC_3D ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_TIME_DEPENDENT_COORDINATE_FRAME_GEOCENTRIC ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_TIME_DEPENDENT_COORDINATE_FRAME_GEOGRAPHIC_2D ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_TIME_DEPENDENT_COORDINATE_FRAME_GEOGRAPHIC_3D ||
|
||||
methodEPSGCode == EPSG_CODE_METHOD_POSITION_VECTOR_GEOCENTRIC ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_POSITION_VECTOR_GEOGRAPHIC_2D ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_POSITION_VECTOR_GEOGRAPHIC_3D ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_TIME_DEPENDENT_POSITION_VECTOR_GEOCENTRIC ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_TIME_DEPENDENT_POSITION_VECTOR_GEOGRAPHIC_2D ||
|
||||
methodEPSGCode ==
|
||||
EPSG_CODE_METHOD_TIME_DEPENDENT_POSITION_VECTOR_GEOGRAPHIC_3D) {
|
||||
saveHorizontalCoords = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (saveHorizontalCoords) {
|
||||
formatter->addStep("push");
|
||||
formatter->addParam("v_1");
|
||||
formatter->addParam("v_2");
|
||||
}
|
||||
|
||||
formatter->pushOmitZUnitConversion();
|
||||
|
||||
@@ -1994,6 +2054,12 @@ struct MyPROJStringExportableHorizVerticalHorizPROJBased final
|
||||
opGeogCRStoDstCRS->_exportToPROJString(formatter);
|
||||
|
||||
formatter->popOmitZUnitConversion();
|
||||
|
||||
if (saveHorizontalCoords) {
|
||||
formatter->addStep("pop");
|
||||
formatter->addParam("v_1");
|
||||
formatter->addParam("v_2");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2321,10 +2387,9 @@ CoordinateOperationFactory::Private::createOperationsGeogToGeog(
|
||||
}
|
||||
|
||||
// Do they differ by vertical units ?
|
||||
if (vconvSrc != vconvDst &&
|
||||
geogSrc->ellipsoid()->_isEquivalentTo(
|
||||
geogDst->ellipsoid().get(),
|
||||
util::IComparable::Criterion::EQUIVALENT)) {
|
||||
if (vconvSrc != vconvDst && geogSrc->ellipsoid()->_isEquivalentTo(
|
||||
geogDst->ellipsoid().get(),
|
||||
util::IComparable::Criterion::EQUIVALENT)) {
|
||||
if (offset_pm.value() == 0 && !axisReversal2D && !axisReversal3D) {
|
||||
// If only by vertical units, use a Change of Vertical
|
||||
// Unit
|
||||
@@ -2615,9 +2680,13 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot(
|
||||
bool isNullFirst) {
|
||||
const auto opsSecond =
|
||||
createOperations(candidateSrcGeod, candidateDstGeod, context);
|
||||
const auto opsThird =
|
||||
createOperations(candidateDstGeod, targetCRS, context);
|
||||
const auto opsThird = createOperations(
|
||||
sourceAndTargetAre3D
|
||||
? candidateDstGeod->promoteTo3D(std::string(), dbContext)
|
||||
: candidateDstGeod,
|
||||
targetCRS, context);
|
||||
assert(!opsThird.empty());
|
||||
const CoordinateOperationNNPtr &opThird(opsThird[0]);
|
||||
|
||||
for (auto &opSecond : opsSecond) {
|
||||
// Check that it is not a transformation synthetized by
|
||||
@@ -2633,8 +2702,7 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot(
|
||||
}
|
||||
|
||||
std::vector<CoordinateOperationNNPtr> subOps;
|
||||
const bool isNullThird =
|
||||
isNullTransformation(opsThird[0]->nameStr());
|
||||
const bool isNullThird = isNullTransformation(opThird->nameStr());
|
||||
CoordinateOperationNNPtr opSecondCloned(
|
||||
(isNullFirst || isNullThird || sourceAndTargetAre3D)
|
||||
? opSecond->shallowClone()
|
||||
@@ -2666,12 +2734,31 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot(
|
||||
}
|
||||
}
|
||||
if (sourceAndTargetAre3D) {
|
||||
opSecondCloned->getPrivate()->use3DHelmert_ = true;
|
||||
auto invCO = dynamic_cast<InverseCoordinateOperation *>(
|
||||
opSecondCloned.get());
|
||||
if (invCO) {
|
||||
auto invCOForward = invCO->forwardOperation().get();
|
||||
invCOForward->getPrivate()->use3DHelmert_ = true;
|
||||
|
||||
// Force Helmert operations to use the 3D domain, even if the
|
||||
// ones we found in EPSG are advertized for the 2D domain.
|
||||
auto concat =
|
||||
dynamic_cast<ConcatenatedOperation *>(opSecondCloned.get());
|
||||
if (concat) {
|
||||
std::vector<CoordinateOperationNNPtr> newSteps;
|
||||
for (const auto &step : concat->operations()) {
|
||||
auto newStep = step->shallowClone();
|
||||
setCRSs(newStep.get(),
|
||||
newStep->sourceCRS()->promoteTo3D(std::string(),
|
||||
dbContext),
|
||||
newStep->targetCRS()->promoteTo3D(std::string(),
|
||||
dbContext));
|
||||
newSteps.emplace_back(newStep);
|
||||
}
|
||||
opSecondCloned =
|
||||
ConcatenatedOperation::createComputeMetadata(
|
||||
newSteps, disallowEmptyIntersection);
|
||||
} else {
|
||||
setCRSs(opSecondCloned.get(),
|
||||
opSecondCloned->sourceCRS()->promoteTo3D(
|
||||
std::string(), dbContext),
|
||||
opSecondCloned->targetCRS()->promoteTo3D(
|
||||
std::string(), dbContext));
|
||||
}
|
||||
}
|
||||
if (isNullFirst) {
|
||||
@@ -2686,7 +2773,7 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot(
|
||||
subOps.emplace_back(opSecondCloned);
|
||||
} else {
|
||||
subOps.emplace_back(opSecondCloned);
|
||||
subOps.emplace_back(opsThird[0]);
|
||||
subOps.emplace_back(opThird);
|
||||
}
|
||||
#ifdef TRACE_CREATE_OPERATIONS
|
||||
std::string debugStr;
|
||||
@@ -2727,6 +2814,10 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot(
|
||||
|
||||
for (const auto &candidateSrcGeod : candidatesSrcGeod) {
|
||||
if (candidateSrcGeod->nameStr() == sourceCRS->nameStr()) {
|
||||
auto sourceSrcGeodModified(
|
||||
sourceAndTargetAre3D
|
||||
? candidateSrcGeod->promoteTo3D(std::string(), dbContext)
|
||||
: candidateSrcGeod);
|
||||
for (const auto &candidateDstGeod : candidatesDstGeod) {
|
||||
if (candidateDstGeod->nameStr() == targetCRS->nameStr()) {
|
||||
#ifdef TRACE_CREATE_OPERATIONS
|
||||
@@ -2735,8 +2826,8 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot(
|
||||
objectAsStr(candidateDstGeod.get()) + "->" +
|
||||
objectAsStr(targetCRS.get()) + ")");
|
||||
#endif
|
||||
const auto opsFirst =
|
||||
createOperations(sourceCRS, candidateSrcGeod, context);
|
||||
const auto opsFirst = createOperations(
|
||||
sourceCRS, sourceSrcGeodModified, context);
|
||||
assert(!opsFirst.empty());
|
||||
const bool isNullFirst =
|
||||
isNullTransformation(opsFirst[0]->nameStr());
|
||||
@@ -2759,8 +2850,12 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot(
|
||||
#ifdef TRACE_CREATE_OPERATIONS
|
||||
ENTER_BLOCK("");
|
||||
#endif
|
||||
auto sourceSrcGeodModified(
|
||||
sourceAndTargetAre3D
|
||||
? candidateSrcGeod->promoteTo3D(std::string(), dbContext)
|
||||
: candidateSrcGeod);
|
||||
const auto opsFirst =
|
||||
createOperations(sourceCRS, candidateSrcGeod, context);
|
||||
createOperations(sourceCRS, sourceSrcGeodModified, context);
|
||||
assert(!opsFirst.empty());
|
||||
const bool isNullFirst = isNullTransformation(opsFirst[0]->nameStr());
|
||||
|
||||
@@ -3267,7 +3362,6 @@ CoordinateOperationFactory::Private::createOperationsGeogToVertFromGeoid(
|
||||
|
||||
const auto useTransf = [&sourceCRS, &targetCRS, &context,
|
||||
vertDst](const CoordinateOperationNNPtr &op) {
|
||||
|
||||
// If the source geographic CRS has a non-metre vertical unit, we need
|
||||
// to create an intermediate and operation to do the vertical unit
|
||||
// conversion from that vertical unit to the one of the geographic CRS
|
||||
@@ -3324,86 +3418,87 @@ CoordinateOperationFactory::Private::createOperationsGeogToVertFromGeoid(
|
||||
return ret;
|
||||
};
|
||||
|
||||
const auto getProjGeoidTransformation = [&sourceCRS, &targetCRS, &vertDst,
|
||||
&context](
|
||||
const CoordinateOperationNNPtr &model,
|
||||
const std::string &projFilename) {
|
||||
|
||||
const auto getNameVertCRSMetre = [](const std::string &name) {
|
||||
if (name.empty())
|
||||
return std::string("unnamed");
|
||||
auto ret(name);
|
||||
bool haveOriginalUnit = false;
|
||||
if (name.back() == ')') {
|
||||
const auto pos = ret.rfind(" (");
|
||||
const auto getProjGeoidTransformation =
|
||||
[&sourceCRS, &targetCRS, &vertDst,
|
||||
&context](const CoordinateOperationNNPtr &model,
|
||||
const std::string &projFilename) {
|
||||
const auto getNameVertCRSMetre = [](const std::string &name) {
|
||||
if (name.empty())
|
||||
return std::string("unnamed");
|
||||
auto ret(name);
|
||||
bool haveOriginalUnit = false;
|
||||
if (name.back() == ')') {
|
||||
const auto pos = ret.rfind(" (");
|
||||
if (pos != std::string::npos) {
|
||||
haveOriginalUnit = true;
|
||||
ret = ret.substr(0, pos);
|
||||
}
|
||||
}
|
||||
const auto pos = ret.rfind(" depth");
|
||||
if (pos != std::string::npos) {
|
||||
haveOriginalUnit = true;
|
||||
ret = ret.substr(0, pos);
|
||||
ret = ret.substr(0, pos) + " height";
|
||||
}
|
||||
if (!haveOriginalUnit) {
|
||||
ret += " (metre)";
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
|
||||
const auto &axis = vertDst->coordinateSystem()->axisList()[0];
|
||||
const auto &authFactory = context.context->getAuthorityFactory();
|
||||
const auto dbContext =
|
||||
authFactory ? authFactory->databaseContext().as_nullable()
|
||||
: nullptr;
|
||||
|
||||
const auto geogSrcCRS =
|
||||
dynamic_cast<crs::GeographicCRS *>(
|
||||
model->interpolationCRS().get())
|
||||
? NN_NO_CHECK(model->interpolationCRS())
|
||||
: sourceCRS->demoteTo2D(std::string(), dbContext)
|
||||
->promoteTo3D(std::string(), dbContext);
|
||||
const auto vertCRSMetre =
|
||||
axis->unit() == common::UnitOfMeasure::METRE &&
|
||||
axis->direction() == cs::AxisDirection::UP
|
||||
? targetCRS
|
||||
: util::nn_static_pointer_cast<crs::CRS>(
|
||||
crs::VerticalCRS::create(
|
||||
util::PropertyMap().set(
|
||||
common::IdentifiedObject::NAME_KEY,
|
||||
getNameVertCRSMetre(targetCRS->nameStr())),
|
||||
vertDst->datum(), vertDst->datumEnsemble(),
|
||||
cs::VerticalCS::createGravityRelatedHeight(
|
||||
common::UnitOfMeasure::METRE)));
|
||||
const auto properties = util::PropertyMap().set(
|
||||
common::IdentifiedObject::NAME_KEY,
|
||||
buildOpName("Transformation", vertCRSMetre, geogSrcCRS));
|
||||
|
||||
// Try to find a representative value for the accuracy of this grid
|
||||
// from the registered transformations.
|
||||
std::vector<metadata::PositionalAccuracyNNPtr> accuracies;
|
||||
const auto &modelAccuracies =
|
||||
model->coordinateOperationAccuracies();
|
||||
if (modelAccuracies.empty()) {
|
||||
if (authFactory) {
|
||||
const auto transformationsForGrid =
|
||||
io::DatabaseContext::getTransformationsForGridName(
|
||||
authFactory->databaseContext(), projFilename);
|
||||
double accuracy = -1;
|
||||
for (const auto &transf : transformationsForGrid) {
|
||||
accuracy = std::max(accuracy, getAccuracy(transf));
|
||||
}
|
||||
if (accuracy >= 0) {
|
||||
accuracies.emplace_back(
|
||||
metadata::PositionalAccuracy::create(
|
||||
toString(accuracy)));
|
||||
}
|
||||
}
|
||||
}
|
||||
const auto pos = ret.rfind(" depth");
|
||||
if (pos != std::string::npos) {
|
||||
ret = ret.substr(0, pos) + " height";
|
||||
}
|
||||
if (!haveOriginalUnit) {
|
||||
ret += " (metre)";
|
||||
}
|
||||
return ret;
|
||||
|
||||
return Transformation::createGravityRelatedHeightToGeographic3D(
|
||||
properties, vertCRSMetre, geogSrcCRS, nullptr, projFilename,
|
||||
!modelAccuracies.empty() ? modelAccuracies : accuracies);
|
||||
};
|
||||
|
||||
const auto &axis = vertDst->coordinateSystem()->axisList()[0];
|
||||
const auto &authFactory = context.context->getAuthorityFactory();
|
||||
const auto dbContext =
|
||||
authFactory ? authFactory->databaseContext().as_nullable()
|
||||
: nullptr;
|
||||
|
||||
const auto geogSrcCRS =
|
||||
dynamic_cast<crs::GeographicCRS *>(model->interpolationCRS().get())
|
||||
? NN_NO_CHECK(model->interpolationCRS())
|
||||
: sourceCRS->demoteTo2D(std::string(), dbContext)
|
||||
->promoteTo3D(std::string(), dbContext);
|
||||
const auto vertCRSMetre =
|
||||
axis->unit() == common::UnitOfMeasure::METRE &&
|
||||
axis->direction() == cs::AxisDirection::UP
|
||||
? targetCRS
|
||||
: util::nn_static_pointer_cast<crs::CRS>(
|
||||
crs::VerticalCRS::create(
|
||||
util::PropertyMap().set(
|
||||
common::IdentifiedObject::NAME_KEY,
|
||||
getNameVertCRSMetre(targetCRS->nameStr())),
|
||||
vertDst->datum(), vertDst->datumEnsemble(),
|
||||
cs::VerticalCS::createGravityRelatedHeight(
|
||||
common::UnitOfMeasure::METRE)));
|
||||
const auto properties = util::PropertyMap().set(
|
||||
common::IdentifiedObject::NAME_KEY,
|
||||
buildOpName("Transformation", vertCRSMetre, geogSrcCRS));
|
||||
|
||||
// Try to find a representative value for the accuracy of this grid
|
||||
// from the registered transformations.
|
||||
std::vector<metadata::PositionalAccuracyNNPtr> accuracies;
|
||||
const auto &modelAccuracies = model->coordinateOperationAccuracies();
|
||||
if (modelAccuracies.empty()) {
|
||||
if (authFactory) {
|
||||
const auto transformationsForGrid =
|
||||
io::DatabaseContext::getTransformationsForGridName(
|
||||
authFactory->databaseContext(), projFilename);
|
||||
double accuracy = -1;
|
||||
for (const auto &transf : transformationsForGrid) {
|
||||
accuracy = std::max(accuracy, getAccuracy(transf));
|
||||
}
|
||||
if (accuracy >= 0) {
|
||||
accuracies.emplace_back(
|
||||
metadata::PositionalAccuracy::create(
|
||||
toString(accuracy)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Transformation::createGravityRelatedHeightToGeographic3D(
|
||||
properties, vertCRSMetre, geogSrcCRS, nullptr, projFilename,
|
||||
!modelAccuracies.empty() ? modelAccuracies : accuracies);
|
||||
};
|
||||
|
||||
std::vector<CoordinateOperationNNPtr> res;
|
||||
const auto &authFactory = context.context->getAuthorityFactory();
|
||||
if (authFactory) {
|
||||
@@ -3593,35 +3688,38 @@ void CoordinateOperationFactory::Private::
|
||||
// NAD83 only exists in 2D version in EPSG, so if it has been
|
||||
// promoted to 3D, when researching a vertical to geog
|
||||
// transformation, try to down cast to 2D.
|
||||
const auto geog3DToVertTryThroughGeog2D = [&res, &context](
|
||||
const crs::GeographicCRS *geogSrcIn, const crs::VerticalCRS *vertDstIn,
|
||||
const crs::CRSNNPtr &targetCRSIn) {
|
||||
if (res.empty() && geogSrcIn && vertDstIn &&
|
||||
geogSrcIn->coordinateSystem()->axisList().size() == 3) {
|
||||
const auto &authFactory = context.context->getAuthorityFactory();
|
||||
const auto dbContext =
|
||||
authFactory ? authFactory->databaseContext().as_nullable()
|
||||
: nullptr;
|
||||
const auto candidatesSrcGeod(findCandidateGeodCRSForDatum(
|
||||
authFactory, geogSrcIn,
|
||||
geogSrcIn->datumNonNull(dbContext).get()));
|
||||
for (const auto &candidate : candidatesSrcGeod) {
|
||||
auto geogCandidate =
|
||||
util::nn_dynamic_pointer_cast<crs::GeographicCRS>(
|
||||
candidate);
|
||||
if (geogCandidate &&
|
||||
geogCandidate->coordinateSystem()->axisList().size() == 2) {
|
||||
bool ignored;
|
||||
res =
|
||||
findOpsInRegistryDirect(NN_NO_CHECK(geogCandidate),
|
||||
targetCRSIn, context, ignored);
|
||||
break;
|
||||
const auto geog3DToVertTryThroughGeog2D =
|
||||
[&res, &context](const crs::GeographicCRS *geogSrcIn,
|
||||
const crs::VerticalCRS *vertDstIn,
|
||||
const crs::CRSNNPtr &targetCRSIn) {
|
||||
if (res.empty() && geogSrcIn && vertDstIn &&
|
||||
geogSrcIn->coordinateSystem()->axisList().size() == 3) {
|
||||
const auto &authFactory =
|
||||
context.context->getAuthorityFactory();
|
||||
const auto dbContext =
|
||||
authFactory ? authFactory->databaseContext().as_nullable()
|
||||
: nullptr;
|
||||
const auto candidatesSrcGeod(findCandidateGeodCRSForDatum(
|
||||
authFactory, geogSrcIn,
|
||||
geogSrcIn->datumNonNull(dbContext).get()));
|
||||
for (const auto &candidate : candidatesSrcGeod) {
|
||||
auto geogCandidate =
|
||||
util::nn_dynamic_pointer_cast<crs::GeographicCRS>(
|
||||
candidate);
|
||||
if (geogCandidate &&
|
||||
geogCandidate->coordinateSystem()->axisList().size() ==
|
||||
2) {
|
||||
bool ignored;
|
||||
res = findOpsInRegistryDirect(
|
||||
NN_NO_CHECK(geogCandidate), targetCRSIn, context,
|
||||
ignored);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
return false;
|
||||
};
|
||||
|
||||
if (geog3DToVertTryThroughGeog2D(geogSrc, vertDst, targetCRS)) {
|
||||
// do nothing
|
||||
@@ -4400,51 +4498,71 @@ getOps(const CoordinateOperationNNPtr &op) {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static bool useDifferentTransformationsForSameSourceTarget(
|
||||
static std::string normalize2D3DInName(const std::string &s) {
|
||||
std::string out = s;
|
||||
const char *const patterns[] = {
|
||||
" (2D)",
|
||||
" (geographic3D horizontal)",
|
||||
" (geog2D)",
|
||||
" (geog3D)",
|
||||
};
|
||||
for (const char *pattern : patterns) {
|
||||
out = replaceAll(out, pattern, "");
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static bool useCompatibleTransformationsForSameSourceTarget(
|
||||
const CoordinateOperationNNPtr &opA, const CoordinateOperationNNPtr &opB) {
|
||||
auto subOpsA = getOps(opA);
|
||||
auto subOpsB = getOps(opB);
|
||||
const auto subOpsA = getOps(opA);
|
||||
const auto subOpsB = getOps(opB);
|
||||
|
||||
for (const auto &subOpA : subOpsA) {
|
||||
if (!dynamic_cast<const Transformation *>(subOpA.get()))
|
||||
continue;
|
||||
if (subOpA->sourceCRS()->nameStr() == "unknown" ||
|
||||
subOpA->targetCRS()->nameStr() == "unknown")
|
||||
const auto subOpAName = normalize2D3DInName(subOpA->nameStr());
|
||||
const auto &subOpASourceCRSName = subOpA->sourceCRS()->nameStr();
|
||||
const auto &subOpATargetCRSName = subOpA->targetCRS()->nameStr();
|
||||
if (subOpASourceCRSName == "unknown" ||
|
||||
subOpATargetCRSName == "unknown")
|
||||
continue;
|
||||
for (const auto &subOpB : subOpsB) {
|
||||
if (!dynamic_cast<const Transformation *>(subOpB.get()))
|
||||
continue;
|
||||
if (subOpB->sourceCRS()->nameStr() == "unknown" ||
|
||||
subOpB->targetCRS()->nameStr() == "unknown")
|
||||
const auto &subOpBSourceCRSName = subOpB->sourceCRS()->nameStr();
|
||||
const auto &subOpBTargetCRSName = subOpB->targetCRS()->nameStr();
|
||||
if (subOpBSourceCRSName == "unknown" ||
|
||||
subOpBTargetCRSName == "unknown")
|
||||
continue;
|
||||
|
||||
if (subOpA->sourceCRS()->nameStr() ==
|
||||
subOpB->sourceCRS()->nameStr() &&
|
||||
subOpA->targetCRS()->nameStr() ==
|
||||
subOpB->targetCRS()->nameStr()) {
|
||||
if (starts_with(subOpA->nameStr(), NULL_GEOGRAPHIC_OFFSET) &&
|
||||
if (subOpASourceCRSName == subOpBSourceCRSName &&
|
||||
subOpATargetCRSName == subOpBTargetCRSName) {
|
||||
const auto &subOpBName = normalize2D3DInName(subOpB->nameStr());
|
||||
if (starts_with(subOpAName, NULL_GEOGRAPHIC_OFFSET) &&
|
||||
starts_with(subOpB->nameStr(), NULL_GEOGRAPHIC_OFFSET)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!subOpA->isEquivalentTo(subOpB.get())) {
|
||||
return true;
|
||||
if (subOpAName != subOpBName) {
|
||||
return false;
|
||||
}
|
||||
} else if (subOpA->sourceCRS()->nameStr() ==
|
||||
subOpB->targetCRS()->nameStr() &&
|
||||
subOpA->targetCRS()->nameStr() ==
|
||||
subOpB->sourceCRS()->nameStr()) {
|
||||
if (starts_with(subOpA->nameStr(), NULL_GEOGRAPHIC_OFFSET) &&
|
||||
starts_with(subOpB->nameStr(), NULL_GEOGRAPHIC_OFFSET)) {
|
||||
} else if (subOpASourceCRSName == subOpBTargetCRSName &&
|
||||
subOpATargetCRSName == subOpBSourceCRSName) {
|
||||
const auto &subOpBName = subOpB->nameStr();
|
||||
if (starts_with(subOpAName, NULL_GEOGRAPHIC_OFFSET) &&
|
||||
starts_with(subOpBName, NULL_GEOGRAPHIC_OFFSET)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!subOpA->isEquivalentTo(subOpB->inverse().get())) {
|
||||
return true;
|
||||
if (subOpAName !=
|
||||
normalize2D3DInName(subOpB->inverse()->nameStr())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -4700,30 +4818,41 @@ void CoordinateOperationFactory::Private::createOperationsCompoundToGeog(
|
||||
(*ids.front()->codeSpace()) + ':' + ids.front()->code();
|
||||
}
|
||||
|
||||
const auto computeOpsToInterp =
|
||||
[&srcToInterpOps, &interpToTargetOps, &componentsSrc,
|
||||
&interpolationGeogCRS, &targetCRS, &dbContext,
|
||||
&context]() {
|
||||
srcToInterpOps = createOperations(
|
||||
componentsSrc[0], NN_NO_CHECK(interpolationGeogCRS),
|
||||
context);
|
||||
auto target2D =
|
||||
targetCRS->demoteTo2D(std::string(), dbContext);
|
||||
if (!componentsSrc[0]->isEquivalentTo(
|
||||
target2D.get(),
|
||||
util::IComparable::Criterion::EQUIVALENT)) {
|
||||
// We do the transformation from the
|
||||
// interpolationCRS
|
||||
// to the target one in 3D (see #2225)
|
||||
// But we don't do that between sourceCRS and
|
||||
// interpolationCRS, as this would mess with an
|
||||
// orthometric elevation.
|
||||
auto interp3D = interpolationGeogCRS->promoteTo3D(
|
||||
std::string(), dbContext);
|
||||
interpToTargetOps =
|
||||
createOperations(interp3D, targetCRS, context);
|
||||
}
|
||||
};
|
||||
const auto computeOpsToInterp = [&srcToInterpOps,
|
||||
&interpToTargetOps,
|
||||
&componentsSrc,
|
||||
&interpolationGeogCRS,
|
||||
&targetCRS, &geogDst,
|
||||
&dbContext, &context]() {
|
||||
// Do the sourceCRS to interpolation CRS in 2D only
|
||||
// to avoid altering the orthometric elevation
|
||||
srcToInterpOps = createOperations(
|
||||
componentsSrc[0], NN_NO_CHECK(interpolationGeogCRS),
|
||||
context);
|
||||
|
||||
// But do the interpolation CRS to targetCRS in 3D
|
||||
// to have proper ellipsoid height transformation.
|
||||
// We need to force the vertical axis of this 3D'ified
|
||||
// interpolation CRS to be the same as the target CRS,
|
||||
// to avoid potential double vertical unit conversion,
|
||||
// as the vertical transformation already takes care of
|
||||
// that.
|
||||
auto interp3D =
|
||||
interpolationGeogCRS
|
||||
->demoteTo2D(std::string(), dbContext)
|
||||
->promoteTo3D(
|
||||
std::string(), dbContext,
|
||||
geogDst->coordinateSystem()
|
||||
->axisList()
|
||||
.size() == 3
|
||||
? geogDst->coordinateSystem()->axisList()[2]
|
||||
: cs::VerticalCS::
|
||||
createGravityRelatedHeight(
|
||||
common::UnitOfMeasure::METRE)
|
||||
->axisList()[0]);
|
||||
interpToTargetOps =
|
||||
createOperations(interp3D, targetCRS, context);
|
||||
};
|
||||
|
||||
if (!key.empty()) {
|
||||
auto iter = cacheHorizToInterpAndInterpToTarget.find(key);
|
||||
@@ -4752,33 +4881,89 @@ void CoordinateOperationFactory::Private::createOperationsCompoundToGeog(
|
||||
#ifdef TRACE_CREATE_OPERATIONS
|
||||
ENTER_BLOCK("creating HorizVerticalHorizPROJBased operations");
|
||||
#endif
|
||||
const bool srcAndTargetGeogAreSame =
|
||||
componentsSrc[0]->isEquivalentTo(
|
||||
targetCRS->demoteTo2D(std::string(), dbContext).get(),
|
||||
util::IComparable::Criterion::EQUIVALENT);
|
||||
|
||||
// Lambda to add to the set the name of geodetic datum of the
|
||||
// CRS
|
||||
const auto addDatumOfToSet = [&dbContext](
|
||||
std::set<std::string> &set,
|
||||
const crs::CRSNNPtr &crs) {
|
||||
auto geodCRS = crs->extractGeodeticCRS();
|
||||
if (geodCRS) {
|
||||
set.insert(geodCRS->datumNonNull(dbContext)->nameStr());
|
||||
}
|
||||
};
|
||||
|
||||
// Lambda to return the set of names of geodetic datums used
|
||||
// by the source and target CRS of a list of operations.
|
||||
const auto makeDatumSet =
|
||||
[&addDatumOfToSet](
|
||||
const std::vector<CoordinateOperationNNPtr> &ops) {
|
||||
std::set<std::string> datumSetOps;
|
||||
for (const auto &subOp : ops) {
|
||||
if (!dynamic_cast<const Transformation *>(
|
||||
subOp.get()))
|
||||
continue;
|
||||
addDatumOfToSet(datumSetOps,
|
||||
NN_NO_CHECK(subOp->sourceCRS()));
|
||||
addDatumOfToSet(datumSetOps,
|
||||
NN_NO_CHECK(subOp->targetCRS()));
|
||||
}
|
||||
return datumSetOps;
|
||||
};
|
||||
|
||||
std::map<CoordinateOperation *, std::set<std::string>>
|
||||
mapSetDatumsUsed;
|
||||
if (srcAndTargetGeogAreSame) {
|
||||
// When the geographic CRS of the source and target, we
|
||||
// want to make sure that the transformation from the
|
||||
// source to the interpolation CRS uses the same datums as
|
||||
// the one from the interpolation CRS to the target CRS.
|
||||
// A simplistic view would be that the srcToInterp and
|
||||
// interpToTarget should be the same, but they are
|
||||
// subtelties, like interpToTarget being done in 3D, so with
|
||||
// additional conversion steps, slightly different names in
|
||||
// operations between 2D and 3D. The initial filter on
|
||||
// checking that we use the same set of datum enable us
|
||||
// to be confident we reject upfront geodetically-dubious
|
||||
// operations.
|
||||
for (const auto &op : srcToInterpOps) {
|
||||
mapSetDatumsUsed[op.get()] = makeDatumSet(getOps(op));
|
||||
}
|
||||
for (const auto &op : interpToTargetOps) {
|
||||
mapSetDatumsUsed[op.get()] = makeDatumSet(getOps(op));
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto &srcToInterp : srcToInterpOps) {
|
||||
if (interpToTargetOps.empty()) {
|
||||
for (const auto &interpToTarget : interpToTargetOps) {
|
||||
|
||||
if ((srcAndTargetGeogAreSame &&
|
||||
mapSetDatumsUsed[srcToInterp.get()] !=
|
||||
mapSetDatumsUsed[interpToTarget.get()]) ||
|
||||
!useCompatibleTransformationsForSameSourceTarget(
|
||||
srcToInterp, interpToTarget)) {
|
||||
#ifdef TRACE_CREATE_OPERATIONS
|
||||
logTrace(
|
||||
"Considering that '" + srcToInterp->nameStr() +
|
||||
"' and '" + interpToTarget->nameStr() +
|
||||
"' do not use consistent operations in the pre "
|
||||
"and post-vertical transformation steps");
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
auto op = createHorizVerticalHorizPROJBased(
|
||||
sourceCRS, targetCRS, srcToInterp,
|
||||
verticalTransform, srcToInterp->inverse(),
|
||||
verticalTransform, interpToTarget,
|
||||
interpolationGeogCRS, true);
|
||||
res.emplace_back(op);
|
||||
} catch (const std::exception &) {
|
||||
}
|
||||
} else {
|
||||
for (const auto &interpToTarget : interpToTargetOps) {
|
||||
|
||||
if (useDifferentTransformationsForSameSourceTarget(
|
||||
srcToInterp, interpToTarget)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
auto op = createHorizVerticalHorizPROJBased(
|
||||
sourceCRS, targetCRS, srcToInterp,
|
||||
verticalTransform, interpToTarget,
|
||||
interpolationGeogCRS, true);
|
||||
res.emplace_back(op);
|
||||
} catch (const std::exception &) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -5169,26 +5354,27 @@ crs::CRSNNPtr CRS::getResolvedCRS(const crs::CRSNNPtr &crs,
|
||||
// Even if they aren't equivalent, we update extentOut with the one of the
|
||||
// identified CRS if our input one is absent/not reliable.
|
||||
|
||||
const auto tryToIdentifyByName = [&crs, &name, &authFactory, approxExtent,
|
||||
&extentOut](
|
||||
io::AuthorityFactory::ObjectType objectType) {
|
||||
if (name != "unknown" && name != "unnamed") {
|
||||
auto matches = authFactory->createObjectsFromName(
|
||||
name, {objectType}, false, 2);
|
||||
if (matches.size() == 1) {
|
||||
const auto match =
|
||||
util::nn_static_pointer_cast<crs::CRS>(matches.front());
|
||||
if (approxExtent || !extentOut) {
|
||||
extentOut = operation::getExtent(match);
|
||||
}
|
||||
if (match->isEquivalentTo(
|
||||
crs.get(), util::IComparable::Criterion::EQUIVALENT)) {
|
||||
return match;
|
||||
const auto tryToIdentifyByName =
|
||||
[&crs, &name, &authFactory, approxExtent,
|
||||
&extentOut](io::AuthorityFactory::ObjectType objectType) {
|
||||
if (name != "unknown" && name != "unnamed") {
|
||||
auto matches = authFactory->createObjectsFromName(
|
||||
name, {objectType}, false, 2);
|
||||
if (matches.size() == 1) {
|
||||
const auto match =
|
||||
util::nn_static_pointer_cast<crs::CRS>(matches.front());
|
||||
if (approxExtent || !extentOut) {
|
||||
extentOut = operation::getExtent(match);
|
||||
}
|
||||
if (match->isEquivalentTo(
|
||||
crs.get(),
|
||||
util::IComparable::Criterion::EQUIVALENT)) {
|
||||
return match;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return crs;
|
||||
};
|
||||
return crs;
|
||||
};
|
||||
|
||||
auto geogCRS = dynamic_cast<crs::GeographicCRS *>(crs.get());
|
||||
if (geogCRS && authFactory) {
|
||||
|
||||
@@ -929,6 +929,15 @@ static const ESRIParamMapping paramsESRI_IGAC_Plano_Cartesiano[] = {
|
||||
EPSG_CODE_PARAMETER_PROJECTION_PLANE_ORIGIN_HEIGHT, "0.0", false},
|
||||
{nullptr, nullptr, 0, "0.0", false}};
|
||||
|
||||
static const ESRIParamMapping paramsESRI_Equal_Earth[] = {
|
||||
{"False_Easting", EPSG_NAME_PARAMETER_FALSE_EASTING,
|
||||
EPSG_CODE_PARAMETER_FALSE_EASTING, "0.0", false},
|
||||
{"False_Northing", EPSG_NAME_PARAMETER_FALSE_NORTHING,
|
||||
EPSG_CODE_PARAMETER_FALSE_NORTHING, "0.0", false},
|
||||
{"Central_Meridian", EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN,
|
||||
EPSG_CODE_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN, "0.0", false},
|
||||
{nullptr, nullptr, 0, "0.0", false}};
|
||||
|
||||
static const ESRIMethodMapping esriMappings[] = {
|
||||
{"Plate_Carree", EPSG_NAME_METHOD_EQUIDISTANT_CYLINDRICAL,
|
||||
EPSG_CODE_METHOD_EQUIDISTANT_CYLINDRICAL, paramsESRI_Plate_Carree},
|
||||
@@ -1093,6 +1102,8 @@ static const ESRIMethodMapping esriMappings[] = {
|
||||
0, paramsESRI_Transverse_Cylindrical_Equal_Area},
|
||||
{"IGAC_Plano_Cartesiano", EPSG_NAME_METHOD_COLOMBIA_URBAN,
|
||||
EPSG_CODE_METHOD_COLOMBIA_URBAN, paramsESRI_IGAC_Plano_Cartesiano},
|
||||
{"Equal_Earth", EPSG_NAME_METHOD_EQUAL_EARTH, EPSG_CODE_METHOD_EQUAL_EARTH,
|
||||
paramsESRI_Equal_Earth},
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -760,8 +760,11 @@ static const MethodMapping projectionMethodMappings[] = {
|
||||
|
||||
{
|
||||
EPSG_NAME_METHOD_OBLIQUE_STEREOGRAPHIC,
|
||||
EPSG_CODE_METHOD_OBLIQUE_STEREOGRAPHIC, "Oblique_Stereographic",
|
||||
"sterea", nullptr, paramsObliqueStereo,
|
||||
EPSG_CODE_METHOD_OBLIQUE_STEREOGRAPHIC,
|
||||
"Oblique_Stereographic",
|
||||
"sterea",
|
||||
nullptr,
|
||||
paramsObliqueStereo,
|
||||
},
|
||||
|
||||
{EPSG_NAME_METHOD_ORTHOGRAPHIC, EPSG_CODE_METHOD_ORTHOGRAPHIC,
|
||||
@@ -884,13 +887,16 @@ const struct MethodNameCode methodNameCodes[] = {
|
||||
// Projection methods
|
||||
METHOD_NAME_CODE(TRANSVERSE_MERCATOR),
|
||||
METHOD_NAME_CODE(TRANSVERSE_MERCATOR_SOUTH_ORIENTATED),
|
||||
METHOD_NAME_CODE(LAMBERT_CONIC_CONFORMAL_1SP), METHOD_NAME_CODE(NZMG),
|
||||
METHOD_NAME_CODE(TUNISIA_MAPPING_GRID), METHOD_NAME_CODE(ALBERS_EQUAL_AREA),
|
||||
METHOD_NAME_CODE(LAMBERT_CONIC_CONFORMAL_1SP),
|
||||
METHOD_NAME_CODE(NZMG),
|
||||
METHOD_NAME_CODE(TUNISIA_MAPPING_GRID),
|
||||
METHOD_NAME_CODE(ALBERS_EQUAL_AREA),
|
||||
METHOD_NAME_CODE(LAMBERT_CONIC_CONFORMAL_2SP),
|
||||
METHOD_NAME_CODE(LAMBERT_CONIC_CONFORMAL_2SP_BELGIUM),
|
||||
METHOD_NAME_CODE(LAMBERT_CONIC_CONFORMAL_2SP_MICHIGAN),
|
||||
METHOD_NAME_CODE(MODIFIED_AZIMUTHAL_EQUIDISTANT),
|
||||
METHOD_NAME_CODE(GUAM_PROJECTION), METHOD_NAME_CODE(BONNE),
|
||||
METHOD_NAME_CODE(GUAM_PROJECTION),
|
||||
METHOD_NAME_CODE(BONNE),
|
||||
METHOD_NAME_CODE(LAMBERT_CYLINDRICAL_EQUAL_AREA_SPHERICAL),
|
||||
METHOD_NAME_CODE(LAMBERT_CYLINDRICAL_EQUAL_AREA),
|
||||
METHOD_NAME_CODE(CASSINI_SOLDNER),
|
||||
@@ -898,16 +904,20 @@ const struct MethodNameCode methodNameCodes[] = {
|
||||
METHOD_NAME_CODE(EQUIDISTANT_CYLINDRICAL_SPHERICAL),
|
||||
METHOD_NAME_CODE(HOTINE_OBLIQUE_MERCATOR_VARIANT_A),
|
||||
METHOD_NAME_CODE(HOTINE_OBLIQUE_MERCATOR_VARIANT_B),
|
||||
METHOD_NAME_CODE(KROVAK_NORTH_ORIENTED), METHOD_NAME_CODE(KROVAK),
|
||||
METHOD_NAME_CODE(KROVAK_NORTH_ORIENTED),
|
||||
METHOD_NAME_CODE(KROVAK),
|
||||
METHOD_NAME_CODE(LAMBERT_AZIMUTHAL_EQUAL_AREA),
|
||||
METHOD_NAME_CODE(POPULAR_VISUALISATION_PSEUDO_MERCATOR),
|
||||
METHOD_NAME_CODE(MERCATOR_VARIANT_A), METHOD_NAME_CODE(MERCATOR_VARIANT_B),
|
||||
METHOD_NAME_CODE(MERCATOR_VARIANT_A),
|
||||
METHOD_NAME_CODE(MERCATOR_VARIANT_B),
|
||||
METHOD_NAME_CODE(OBLIQUE_STEREOGRAPHIC),
|
||||
METHOD_NAME_CODE(AMERICAN_POLYCONIC),
|
||||
METHOD_NAME_CODE(POLAR_STEREOGRAPHIC_VARIANT_A),
|
||||
METHOD_NAME_CODE(POLAR_STEREOGRAPHIC_VARIANT_B),
|
||||
METHOD_NAME_CODE(EQUAL_EARTH), METHOD_NAME_CODE(LABORDE_OBLIQUE_MERCATOR),
|
||||
METHOD_NAME_CODE(VERTICAL_PERSPECTIVE), METHOD_NAME_CODE(COLOMBIA_URBAN),
|
||||
METHOD_NAME_CODE(EQUAL_EARTH),
|
||||
METHOD_NAME_CODE(LABORDE_OBLIQUE_MERCATOR),
|
||||
METHOD_NAME_CODE(VERTICAL_PERSPECTIVE),
|
||||
METHOD_NAME_CODE(COLOMBIA_URBAN),
|
||||
// Other conversions
|
||||
METHOD_NAME_CODE(CHANGE_VERTICAL_UNIT),
|
||||
METHOD_NAME_CODE(HEIGHT_DEPTH_REVERSAL),
|
||||
@@ -940,11 +950,15 @@ const struct MethodNameCode methodNameCodes[] = {
|
||||
METHOD_NAME_CODE(MOLODENSKY_BADEKAS_PV_GEOCENTRIC),
|
||||
METHOD_NAME_CODE(MOLODENSKY_BADEKAS_PV_GEOGRAPHIC_2D),
|
||||
METHOD_NAME_CODE(MOLODENSKY_BADEKAS_PV_GEOGRAPHIC_3D),
|
||||
METHOD_NAME_CODE(MOLODENSKY), METHOD_NAME_CODE(ABRIDGED_MOLODENSKY),
|
||||
METHOD_NAME_CODE(MOLODENSKY),
|
||||
METHOD_NAME_CODE(ABRIDGED_MOLODENSKY),
|
||||
METHOD_NAME_CODE(GEOGRAPHIC2D_OFFSETS),
|
||||
METHOD_NAME_CODE(GEOGRAPHIC2D_WITH_HEIGHT_OFFSETS),
|
||||
METHOD_NAME_CODE(GEOGRAPHIC3D_OFFSETS), METHOD_NAME_CODE(VERTICAL_OFFSET),
|
||||
METHOD_NAME_CODE(NTV2), METHOD_NAME_CODE(NTV1), METHOD_NAME_CODE(NADCON),
|
||||
METHOD_NAME_CODE(GEOGRAPHIC3D_OFFSETS),
|
||||
METHOD_NAME_CODE(VERTICAL_OFFSET),
|
||||
METHOD_NAME_CODE(NTV2),
|
||||
METHOD_NAME_CODE(NTV1),
|
||||
METHOD_NAME_CODE(NADCON),
|
||||
METHOD_NAME_CODE(VERTCON),
|
||||
METHOD_NAME_CODE(GEOCENTRIC_TRANSLATION_BY_GRID_INTERPOLATION_IGN),
|
||||
};
|
||||
@@ -963,7 +977,8 @@ const struct ParamNameCode paramNameCodes[] = {
|
||||
PARAM_NAME_CODE(LATITUDE_OF_NATURAL_ORIGIN),
|
||||
PARAM_NAME_CODE(LONGITUDE_OF_NATURAL_ORIGIN),
|
||||
PARAM_NAME_CODE(SCALE_FACTOR_AT_NATURAL_ORIGIN),
|
||||
PARAM_NAME_CODE(FALSE_EASTING), PARAM_NAME_CODE(FALSE_NORTHING),
|
||||
PARAM_NAME_CODE(FALSE_EASTING),
|
||||
PARAM_NAME_CODE(FALSE_NORTHING),
|
||||
PARAM_NAME_CODE(LATITUDE_PROJECTION_CENTRE),
|
||||
PARAM_NAME_CODE(LONGITUDE_PROJECTION_CENTRE),
|
||||
PARAM_NAME_CODE(AZIMUTH_INITIAL_LINE),
|
||||
@@ -994,21 +1009,32 @@ const struct ParamNameCode paramNameCodes[] = {
|
||||
PARAM_NAME_CODE(VERTICAL_OFFSET_FILE),
|
||||
PARAM_NAME_CODE(LATITUDE_DIFFERENCE_FILE),
|
||||
PARAM_NAME_CODE(LONGITUDE_DIFFERENCE_FILE),
|
||||
PARAM_NAME_CODE(UNIT_CONVERSION_SCALAR), PARAM_NAME_CODE(LATITUDE_OFFSET),
|
||||
PARAM_NAME_CODE(LONGITUDE_OFFSET), PARAM_NAME_CODE(VERTICAL_OFFSET),
|
||||
PARAM_NAME_CODE(GEOID_UNDULATION), PARAM_NAME_CODE(A0), PARAM_NAME_CODE(A1),
|
||||
PARAM_NAME_CODE(A2), PARAM_NAME_CODE(B0), PARAM_NAME_CODE(B1),
|
||||
PARAM_NAME_CODE(B2), PARAM_NAME_CODE(X_AXIS_TRANSLATION),
|
||||
PARAM_NAME_CODE(Y_AXIS_TRANSLATION), PARAM_NAME_CODE(Z_AXIS_TRANSLATION),
|
||||
PARAM_NAME_CODE(X_AXIS_ROTATION), PARAM_NAME_CODE(Y_AXIS_ROTATION),
|
||||
PARAM_NAME_CODE(Z_AXIS_ROTATION), PARAM_NAME_CODE(SCALE_DIFFERENCE),
|
||||
PARAM_NAME_CODE(UNIT_CONVERSION_SCALAR),
|
||||
PARAM_NAME_CODE(LATITUDE_OFFSET),
|
||||
PARAM_NAME_CODE(LONGITUDE_OFFSET),
|
||||
PARAM_NAME_CODE(VERTICAL_OFFSET),
|
||||
PARAM_NAME_CODE(GEOID_UNDULATION),
|
||||
PARAM_NAME_CODE(A0),
|
||||
PARAM_NAME_CODE(A1),
|
||||
PARAM_NAME_CODE(A2),
|
||||
PARAM_NAME_CODE(B0),
|
||||
PARAM_NAME_CODE(B1),
|
||||
PARAM_NAME_CODE(B2),
|
||||
PARAM_NAME_CODE(X_AXIS_TRANSLATION),
|
||||
PARAM_NAME_CODE(Y_AXIS_TRANSLATION),
|
||||
PARAM_NAME_CODE(Z_AXIS_TRANSLATION),
|
||||
PARAM_NAME_CODE(X_AXIS_ROTATION),
|
||||
PARAM_NAME_CODE(Y_AXIS_ROTATION),
|
||||
PARAM_NAME_CODE(Z_AXIS_ROTATION),
|
||||
PARAM_NAME_CODE(SCALE_DIFFERENCE),
|
||||
PARAM_NAME_CODE(RATE_X_AXIS_TRANSLATION),
|
||||
PARAM_NAME_CODE(RATE_Y_AXIS_TRANSLATION),
|
||||
PARAM_NAME_CODE(RATE_Z_AXIS_TRANSLATION),
|
||||
PARAM_NAME_CODE(RATE_X_AXIS_ROTATION),
|
||||
PARAM_NAME_CODE(RATE_Y_AXIS_ROTATION),
|
||||
PARAM_NAME_CODE(RATE_Z_AXIS_ROTATION),
|
||||
PARAM_NAME_CODE(RATE_SCALE_DIFFERENCE), PARAM_NAME_CODE(REFERENCE_EPOCH),
|
||||
PARAM_NAME_CODE(RATE_SCALE_DIFFERENCE),
|
||||
PARAM_NAME_CODE(REFERENCE_EPOCH),
|
||||
PARAM_NAME_CODE(TRANSFORMATION_REFERENCE_EPOCH),
|
||||
PARAM_NAME_CODE(ORDINATE_1_EVAL_POINT),
|
||||
PARAM_NAME_CODE(ORDINATE_2_EVAL_POINT),
|
||||
|
||||
@@ -103,10 +103,8 @@ GridDescription::GridDescription(const GridDescription &) = default;
|
||||
GridDescription::GridDescription(GridDescription &&other) noexcept
|
||||
: shortName(std::move(other.shortName)),
|
||||
fullName(std::move(other.fullName)),
|
||||
packageName(std::move(other.packageName)),
|
||||
url(std::move(other.url)),
|
||||
directDownload(other.directDownload),
|
||||
openLicense(other.openLicense),
|
||||
packageName(std::move(other.packageName)), url(std::move(other.url)),
|
||||
directDownload(other.directDownload), openLicense(other.openLicense),
|
||||
available(other.available) {}
|
||||
|
||||
//! @endcond
|
||||
@@ -1108,8 +1106,8 @@ SingleOperation::parameterValue(const std::string ¶mName,
|
||||
* @param epsg_code the parameter EPSG code
|
||||
* @return the value, or nullptr if not found.
|
||||
*/
|
||||
const ParameterValuePtr &SingleOperation::parameterValue(int epsg_code) const
|
||||
noexcept {
|
||||
const ParameterValuePtr &
|
||||
SingleOperation::parameterValue(int epsg_code) const noexcept {
|
||||
for (const auto &genOpParamvalue : parameterValues()) {
|
||||
auto opParamvalue = dynamic_cast<const OperationParameterValue *>(
|
||||
genOpParamvalue.get());
|
||||
@@ -1160,8 +1158,8 @@ SingleOperation::parameterValueMeasure(int epsg_code) const noexcept {
|
||||
|
||||
//! @cond Doxygen_Suppress
|
||||
|
||||
double SingleOperation::parameterValueNumericAsSI(int epsg_code) const
|
||||
noexcept {
|
||||
double
|
||||
SingleOperation::parameterValueNumericAsSI(int epsg_code) const noexcept {
|
||||
const auto &val = parameterValue(epsg_code);
|
||||
if (val && val->type() == ParameterValue::Type::MEASURE) {
|
||||
return val->value().getSIValue();
|
||||
@@ -1179,8 +1177,8 @@ double SingleOperation::parameterValueNumeric(
|
||||
}
|
||||
|
||||
double SingleOperation::parameterValueNumeric(
|
||||
const char *param_name, const common::UnitOfMeasure &targetUnit) const
|
||||
noexcept {
|
||||
const char *param_name,
|
||||
const common::UnitOfMeasure &targetUnit) const noexcept {
|
||||
const auto &val = parameterValue(param_name, 0);
|
||||
if (val && val->type() == ParameterValue::Type::MEASURE) {
|
||||
return val->value().convertToUnit(targetUnit);
|
||||
|
||||
@@ -268,23 +268,20 @@ Transformation::getTOWGS84Parameters() const // throw(io::FormattingException)
|
||||
} else if (epsg_code ==
|
||||
EPSG_CODE_PARAMETER_X_AXIS_ROTATION) {
|
||||
params[3] = fixNegativeZero(
|
||||
rotSign *
|
||||
measure.convertToUnit(
|
||||
common::UnitOfMeasure::ARC_SECOND));
|
||||
rotSign * measure.convertToUnit(
|
||||
common::UnitOfMeasure::ARC_SECOND));
|
||||
foundRotX = true;
|
||||
} else if (epsg_code ==
|
||||
EPSG_CODE_PARAMETER_Y_AXIS_ROTATION) {
|
||||
params[4] = fixNegativeZero(
|
||||
rotSign *
|
||||
measure.convertToUnit(
|
||||
common::UnitOfMeasure::ARC_SECOND));
|
||||
rotSign * measure.convertToUnit(
|
||||
common::UnitOfMeasure::ARC_SECOND));
|
||||
foundRotY = true;
|
||||
} else if (epsg_code ==
|
||||
EPSG_CODE_PARAMETER_Z_AXIS_ROTATION) {
|
||||
params[5] = fixNegativeZero(
|
||||
rotSign *
|
||||
measure.convertToUnit(
|
||||
common::UnitOfMeasure::ARC_SECOND));
|
||||
rotSign * measure.convertToUnit(
|
||||
common::UnitOfMeasure::ARC_SECOND));
|
||||
foundRotZ = true;
|
||||
} else if (epsg_code ==
|
||||
EPSG_CODE_PARAMETER_SCALE_DIFFERENCE) {
|
||||
@@ -2008,6 +2005,7 @@ isGeographic3DToGravityRelatedHeight(const OperationMethodNNPtr &method,
|
||||
"1096", // Geog3D to Geog2D+GravityRelatedHeight (OSGM15-Ire)
|
||||
"1097", // Geog3D to Geog2D+GravityRelatedHeight (OSGM-GB)
|
||||
"1098", // Geog3D to Geog2D+GravityRelatedHeight (SA 2010)
|
||||
"1100", // Geog3D to Geog2D+GravityRelatedHeight (PL txt)
|
||||
"1103", // Geog3D to Geog2D+GravityRelatedHeight (EGM)
|
||||
"9661", // Geographic3D to GravityRelatedHeight (EGM)
|
||||
"9662", // Geographic3D to GravityRelatedHeight (Ausgeoid98)
|
||||
@@ -2178,14 +2176,13 @@ TransformationNNPtr Transformation::substitutePROJAlternativeGridNames(
|
||||
}
|
||||
}
|
||||
const auto &horizontalGridName =
|
||||
!NTv1Filename.empty() ? NTv1Filename : !NTv2Filename.empty()
|
||||
? NTv2Filename
|
||||
: lasFilename;
|
||||
!NTv1Filename.empty()
|
||||
? NTv1Filename
|
||||
: !NTv2Filename.empty() ? NTv2Filename : lasFilename;
|
||||
|
||||
if (!horizontalGridName.empty() &&
|
||||
databaseContext->lookForGridAlternative(horizontalGridName,
|
||||
projFilename, projGridFormat,
|
||||
inverseDirection)) {
|
||||
if (!horizontalGridName.empty() && databaseContext->lookForGridAlternative(
|
||||
horizontalGridName, projFilename,
|
||||
projGridFormat, inverseDirection)) {
|
||||
|
||||
if (horizontalGridName == projFilename) {
|
||||
if (inverseDirection) {
|
||||
@@ -2296,13 +2293,14 @@ TransformationNNPtr Transformation::substitutePROJAlternativeGridNames(
|
||||
EPSG_CODE_PARAMETER_GEOID_CORRECTION_FILENAME)};
|
||||
#ifdef disabled_for_now
|
||||
if (inverseDirection) {
|
||||
return create(createPropertiesForInverse(
|
||||
self.as_nullable().get(), true, false),
|
||||
targetCRS(), sourceCRS(), nullptr,
|
||||
createSimilarPropertiesMethod(method()),
|
||||
parameters, {ParameterValue::createFilename(
|
||||
projFilename)},
|
||||
coordinateOperationAccuracies())
|
||||
return create(
|
||||
createPropertiesForInverse(
|
||||
self.as_nullable().get(), true, false),
|
||||
targetCRS(), sourceCRS(), nullptr,
|
||||
createSimilarPropertiesMethod(method()),
|
||||
parameters,
|
||||
{ParameterValue::createFilename(projFilename)},
|
||||
coordinateOperationAccuracies())
|
||||
->inverseAsTransformation();
|
||||
} else
|
||||
#endif
|
||||
@@ -2349,7 +2347,8 @@ TransformationNNPtr Transformation::substitutePROJAlternativeGridNames(
|
||||
if (methodEPSGCode == EPSG_CODE_METHOD_VERTCON ||
|
||||
methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_NZLVD ||
|
||||
methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_BEV_AT ||
|
||||
methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_GTX) {
|
||||
methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_GTX ||
|
||||
methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_PL_TXT) {
|
||||
auto fileParameter =
|
||||
parameterValue(EPSG_NAME_PARAMETER_VERTICAL_OFFSET_FILE,
|
||||
EPSG_CODE_PARAMETER_VERTICAL_OFFSET_FILE);
|
||||
@@ -2373,13 +2372,14 @@ TransformationNNPtr Transformation::substitutePROJAlternativeGridNames(
|
||||
createOpParamNameEPSGCode(
|
||||
EPSG_CODE_PARAMETER_VERTICAL_OFFSET_FILE)};
|
||||
if (inverseDirection) {
|
||||
return create(createPropertiesForInverse(
|
||||
self.as_nullable().get(), true, false),
|
||||
targetCRS(), sourceCRS(), nullptr,
|
||||
createSimilarPropertiesMethod(method()),
|
||||
parameters, {ParameterValue::createFilename(
|
||||
projFilename)},
|
||||
coordinateOperationAccuracies())
|
||||
return create(
|
||||
createPropertiesForInverse(
|
||||
self.as_nullable().get(), true, false),
|
||||
targetCRS(), sourceCRS(), nullptr,
|
||||
createSimilarPropertiesMethod(method()),
|
||||
parameters,
|
||||
{ParameterValue::createFilename(projFilename)},
|
||||
coordinateOperationAccuracies())
|
||||
->inverseAsTransformation();
|
||||
} else {
|
||||
return create(
|
||||
@@ -2597,7 +2597,6 @@ void Transformation::_exportToPROJString(
|
||||
auto targetCRSGeog =
|
||||
dynamic_cast<const crs::GeographicCRS *>(targetCRS().get());
|
||||
const bool addPushPopV3 =
|
||||
!CoordinateOperation::getPrivate()->use3DHelmert_ &&
|
||||
((sourceCRSGeog &&
|
||||
sourceCRSGeog->coordinateSystem()->axisList().size() == 2) ||
|
||||
(targetCRSGeog &&
|
||||
@@ -2985,9 +2984,9 @@ void Transformation::_exportToPROJString(
|
||||
const auto &hGridShiftFilename =
|
||||
!HorizontalShiftGTIFFFilename.empty()
|
||||
? HorizontalShiftGTIFFFilename
|
||||
: !NTv1Filename.empty() ? NTv1Filename : !NTv2Filename.empty()
|
||||
? NTv2Filename
|
||||
: CTABLE2Filename;
|
||||
: !NTv1Filename.empty()
|
||||
? NTv1Filename
|
||||
: !NTv2Filename.empty() ? NTv2Filename : CTABLE2Filename;
|
||||
if (!hGridShiftFilename.empty()) {
|
||||
auto sourceCRSGeog =
|
||||
extractGeographicCRSIfGeographicCRSOrEquivalent(sourceCRS());
|
||||
@@ -3199,7 +3198,8 @@ void Transformation::_exportToPROJString(
|
||||
|
||||
if (methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_NZLVD ||
|
||||
methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_BEV_AT ||
|
||||
methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_GTX) {
|
||||
methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_GTX ||
|
||||
methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_PL_TXT) {
|
||||
auto fileParameter =
|
||||
parameterValue(EPSG_NAME_PARAMETER_VERTICAL_OFFSET_FILE,
|
||||
EPSG_CODE_PARAMETER_VERTICAL_OFFSET_FILE);
|
||||
@@ -3282,5 +3282,5 @@ void Transformation::_exportToPROJString(
|
||||
throw io::FormattingException("Unimplemented");
|
||||
}
|
||||
|
||||
} // namespace crs
|
||||
} // namespace operation
|
||||
NS_PROJ_END
|
||||
|
||||
+5
-4
@@ -49,7 +49,7 @@ void pj_stderr_logger( void *app_data, int level, const char *msg )
|
||||
/* pj_vlog() */
|
||||
/************************************************************************/
|
||||
void pj_vlog( PJ_CONTEXT *ctx, int level, const char *fmt, va_list args );
|
||||
/* Workhorse for the log functions - relates to pj_log as vsprintf relates to sprintf */
|
||||
|
||||
void pj_vlog( PJ_CONTEXT *ctx, int level, const char *fmt, va_list args )
|
||||
|
||||
{
|
||||
@@ -67,12 +67,13 @@ void pj_vlog( PJ_CONTEXT *ctx, int level, const char *fmt, va_list args )
|
||||
if( level > debug_level )
|
||||
return;
|
||||
|
||||
msg_buf = (char *) malloc(100000);
|
||||
constexpr size_t BUF_SIZE = 100000;
|
||||
msg_buf = (char *) malloc(BUF_SIZE);
|
||||
if( msg_buf == nullptr )
|
||||
return;
|
||||
|
||||
/* we should use vsnprintf where available once we add configure detect.*/
|
||||
vsprintf( msg_buf, fmt, args );
|
||||
vsnprintf( msg_buf, BUF_SIZE, fmt, args );
|
||||
msg_buf[BUF_SIZE-1] = '\0';
|
||||
|
||||
ctx->logger( ctx->logger_app_data, level, msg_buf );
|
||||
|
||||
|
||||
+94
-93
@@ -53,7 +53,7 @@ class MyMutex {
|
||||
// cppcheck-suppress functionStatic
|
||||
void unlock() { pj_release_lock(); }
|
||||
};
|
||||
}
|
||||
} // namespace
|
||||
#else
|
||||
#include <mutex>
|
||||
#define MyMutex std::mutex
|
||||
@@ -839,50 +839,51 @@ void NetworkChunkCache::insert(PJ_CONTEXT *ctx, const std::string &url,
|
||||
|
||||
// Lambda to recycle an existing entry that was either invalidated, or
|
||||
// least recently used.
|
||||
const auto reuseExistingEntry = [ctx, &blob, &diskCache, hDB, &url,
|
||||
chunkIdx, &dataPtr](
|
||||
std::unique_ptr<SQLiteStatement> &stmtIn) {
|
||||
const auto chunk_id = stmtIn->getInt64();
|
||||
const auto data_id = stmtIn->getInt64();
|
||||
if (data_id <= 0) {
|
||||
pj_log(ctx, PJ_LOG_ERROR, "data_id <= 0");
|
||||
return;
|
||||
}
|
||||
|
||||
auto l_stmt =
|
||||
diskCache->prepare("UPDATE chunk_data SET data = ? WHERE id = ?");
|
||||
if (!l_stmt)
|
||||
return;
|
||||
l_stmt->bindBlob(blob.data(), blob.size());
|
||||
l_stmt->bindInt64(data_id);
|
||||
{
|
||||
const auto ret2 = l_stmt->execute();
|
||||
if (ret2 != SQLITE_DONE) {
|
||||
pj_log(ctx, PJ_LOG_ERROR, "%s", sqlite3_errmsg(hDB));
|
||||
const auto reuseExistingEntry =
|
||||
[ctx, &blob, &diskCache, hDB, &url, chunkIdx,
|
||||
&dataPtr](std::unique_ptr<SQLiteStatement> &stmtIn) {
|
||||
const auto chunk_id = stmtIn->getInt64();
|
||||
const auto data_id = stmtIn->getInt64();
|
||||
if (data_id <= 0) {
|
||||
pj_log(ctx, PJ_LOG_ERROR, "data_id <= 0");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
l_stmt = diskCache->prepare("UPDATE chunks SET url = ?, "
|
||||
"offset = ?, data_size = ?, data_id = ? "
|
||||
"WHERE id = ?");
|
||||
if (!l_stmt)
|
||||
return;
|
||||
l_stmt->bindText(url.c_str());
|
||||
l_stmt->bindInt64(chunkIdx * DOWNLOAD_CHUNK_SIZE);
|
||||
l_stmt->bindInt64(dataPtr->size());
|
||||
l_stmt->bindInt64(data_id);
|
||||
l_stmt->bindInt64(chunk_id);
|
||||
{
|
||||
const auto ret2 = l_stmt->execute();
|
||||
if (ret2 != SQLITE_DONE) {
|
||||
pj_log(ctx, PJ_LOG_ERROR, "%s", sqlite3_errmsg(hDB));
|
||||
auto l_stmt = diskCache->prepare(
|
||||
"UPDATE chunk_data SET data = ? WHERE id = ?");
|
||||
if (!l_stmt)
|
||||
return;
|
||||
l_stmt->bindBlob(blob.data(), blob.size());
|
||||
l_stmt->bindInt64(data_id);
|
||||
{
|
||||
const auto ret2 = l_stmt->execute();
|
||||
if (ret2 != SQLITE_DONE) {
|
||||
pj_log(ctx, PJ_LOG_ERROR, "%s", sqlite3_errmsg(hDB));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
diskCache->move_to_head(chunk_id);
|
||||
};
|
||||
l_stmt =
|
||||
diskCache->prepare("UPDATE chunks SET url = ?, "
|
||||
"offset = ?, data_size = ?, data_id = ? "
|
||||
"WHERE id = ?");
|
||||
if (!l_stmt)
|
||||
return;
|
||||
l_stmt->bindText(url.c_str());
|
||||
l_stmt->bindInt64(chunkIdx * DOWNLOAD_CHUNK_SIZE);
|
||||
l_stmt->bindInt64(dataPtr->size());
|
||||
l_stmt->bindInt64(data_id);
|
||||
l_stmt->bindInt64(chunk_id);
|
||||
{
|
||||
const auto ret2 = l_stmt->execute();
|
||||
if (ret2 != SQLITE_DONE) {
|
||||
pj_log(ctx, PJ_LOG_ERROR, "%s", sqlite3_errmsg(hDB));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
diskCache->move_to_head(chunk_id);
|
||||
};
|
||||
|
||||
// Find if there is an invalidated chunk we can reuse
|
||||
stmt = diskCache->prepare(
|
||||
@@ -2017,16 +2018,16 @@ int proj_context_set_network_callbacks(
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** Enable or disable network access.
|
||||
*
|
||||
* This overrides the default endpoint in the PROJ configuration file or with
|
||||
* the PROJ_NETWORK environment variable.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param enable TRUE if network access is allowed.
|
||||
* @return TRUE if network access is possible. That is either libcurl is
|
||||
* available, or an alternate interface has been set.
|
||||
* @since 7.0
|
||||
*/
|
||||
*
|
||||
* This overrides the default endpoint in the PROJ configuration file or with
|
||||
* the PROJ_NETWORK environment variable.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param enable TRUE if network access is allowed.
|
||||
* @return TRUE if network access is possible. That is either libcurl is
|
||||
* available, or an alternate interface has been set.
|
||||
* @since 7.0
|
||||
*/
|
||||
int proj_context_set_enable_network(PJ_CONTEXT *ctx, int enable) {
|
||||
if (ctx == nullptr) {
|
||||
ctx = pj_get_default_ctx();
|
||||
@@ -2046,11 +2047,11 @@ int proj_context_set_enable_network(PJ_CONTEXT *ctx, int enable) {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** Return if network access is enabled.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @return TRUE if network access has been enabled
|
||||
* @since 7.0
|
||||
*/
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @return TRUE if network access has been enabled
|
||||
* @since 7.0
|
||||
*/
|
||||
int proj_context_is_network_enabled(PJ_CONTEXT *ctx) {
|
||||
if (ctx == nullptr) {
|
||||
ctx = pj_get_default_ctx();
|
||||
@@ -2074,14 +2075,14 @@ int proj_context_is_network_enabled(PJ_CONTEXT *ctx) {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** Define the URL endpoint to query for remote grids.
|
||||
*
|
||||
* This overrides the default endpoint in the PROJ configuration file or with
|
||||
* the PROJ_NETWORK_ENDPOINT environment variable.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param url Endpoint URL. Must NOT be NULL.
|
||||
* @since 7.0
|
||||
*/
|
||||
*
|
||||
* This overrides the default endpoint in the PROJ configuration file or with
|
||||
* the PROJ_NETWORK_ENDPOINT environment variable.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param url Endpoint URL. Must NOT be NULL.
|
||||
* @since 7.0
|
||||
*/
|
||||
void proj_context_set_url_endpoint(PJ_CONTEXT *ctx, const char *url) {
|
||||
if (ctx == nullptr) {
|
||||
ctx = pj_get_default_ctx();
|
||||
@@ -2094,13 +2095,13 @@ void proj_context_set_url_endpoint(PJ_CONTEXT *ctx, const char *url) {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** Enable or disable the local cache of grid chunks
|
||||
*
|
||||
* This overrides the setting in the PROJ configuration file.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param enabled TRUE if the cache is enabled.
|
||||
* @since 7.0
|
||||
*/
|
||||
*
|
||||
* This overrides the setting in the PROJ configuration file.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param enabled TRUE if the cache is enabled.
|
||||
* @since 7.0
|
||||
*/
|
||||
void proj_grid_cache_set_enable(PJ_CONTEXT *ctx, int enabled) {
|
||||
if (ctx == nullptr) {
|
||||
ctx = pj_get_default_ctx();
|
||||
@@ -2113,13 +2114,13 @@ void proj_grid_cache_set_enable(PJ_CONTEXT *ctx, int enabled) {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** Override, for the considered context, the path and file of the local
|
||||
* cache of grid chunks.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param fullname Full name to the cache (encoded in UTF-8). If set to NULL,
|
||||
* caching will be disabled.
|
||||
* @since 7.0
|
||||
*/
|
||||
* cache of grid chunks.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param fullname Full name to the cache (encoded in UTF-8). If set to NULL,
|
||||
* caching will be disabled.
|
||||
* @since 7.0
|
||||
*/
|
||||
void proj_grid_cache_set_filename(PJ_CONTEXT *ctx, const char *fullname) {
|
||||
if (ctx == nullptr) {
|
||||
ctx = pj_get_default_ctx();
|
||||
@@ -2132,13 +2133,13 @@ void proj_grid_cache_set_filename(PJ_CONTEXT *ctx, const char *fullname) {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** Override, for the considered context, the maximum size of the local
|
||||
* cache of grid chunks.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param max_size_MB Maximum size, in mega-bytes (1024*1024 bytes), or
|
||||
* negative value to set unlimited size.
|
||||
* @since 7.0
|
||||
*/
|
||||
* cache of grid chunks.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param max_size_MB Maximum size, in mega-bytes (1024*1024 bytes), or
|
||||
* negative value to set unlimited size.
|
||||
* @since 7.0
|
||||
*/
|
||||
void proj_grid_cache_set_max_size(PJ_CONTEXT *ctx, int max_size_MB) {
|
||||
if (ctx == nullptr) {
|
||||
ctx = pj_get_default_ctx();
|
||||
@@ -2160,12 +2161,12 @@ void proj_grid_cache_set_max_size(PJ_CONTEXT *ctx, int max_size_MB) {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** Override, for the considered context, the time-to-live delay for
|
||||
* re-checking if the cached properties of files are still up-to-date.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param ttl_seconds Delay in seconds. Use negative value for no expiration.
|
||||
* @since 7.0
|
||||
*/
|
||||
* re-checking if the cached properties of files are still up-to-date.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @param ttl_seconds Delay in seconds. Use negative value for no expiration.
|
||||
* @since 7.0
|
||||
*/
|
||||
void proj_grid_cache_set_ttl(PJ_CONTEXT *ctx, int ttl_seconds) {
|
||||
if (ctx == nullptr) {
|
||||
ctx = pj_get_default_ctx();
|
||||
@@ -2178,10 +2179,10 @@ void proj_grid_cache_set_ttl(PJ_CONTEXT *ctx, int ttl_seconds) {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** Clear the local cache of grid chunks.
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @since 7.0
|
||||
*/
|
||||
*
|
||||
* @param ctx PROJ context, or NULL
|
||||
* @since 7.0
|
||||
*/
|
||||
void proj_grid_cache_clear(PJ_CONTEXT *ctx) {
|
||||
if (ctx == nullptr) {
|
||||
ctx = pj_get_default_ctx();
|
||||
|
||||
@@ -201,6 +201,14 @@ PROJVALUE pj_param (PJ_CONTEXT *ctx, paralist *pl, const char *opt) {
|
||||
switch (type) {
|
||||
case 'i': /* integer input */
|
||||
value.i = atoi(opt);
|
||||
for( const char* ptr = opt; *ptr != '\0'; ++ptr )
|
||||
{
|
||||
if( !(*ptr >= '0' && *ptr <= '9') )
|
||||
{
|
||||
proj_context_errno_set (ctx, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE);
|
||||
value.i = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'd': /* simple real input */
|
||||
value.f = pj_atof(opt);
|
||||
|
||||
+13
-1
@@ -172,7 +172,19 @@ extern "C" {
|
||||
/* The version numbers should be updated with every release! **/
|
||||
#define PROJ_VERSION_MAJOR 8
|
||||
#define PROJ_VERSION_MINOR 0
|
||||
#define PROJ_VERSION_PATCH 0
|
||||
#define PROJ_VERSION_PATCH 1
|
||||
|
||||
/* Note: the following 3 defines have been introduced in PROJ 8.0.1 */
|
||||
/* Macro to compute a PROJ version number from its components */
|
||||
#define PROJ_COMPUTE_VERSION(maj,min,patch) ((maj)*10000+(min)*100+(patch))
|
||||
|
||||
/* Current PROJ version from the above version numbers */
|
||||
#define PROJ_VERSION_NUMBER \
|
||||
PROJ_COMPUTE_VERSION(PROJ_VERSION_MAJOR, PROJ_VERSION_MINOR, PROJ_VERSION_PATCH)
|
||||
|
||||
/* Macro that returns true if the current PROJ version is at least the version specified by (maj,min,patch) */
|
||||
#define PROJ_AT_LEAST_VERSION(maj,min,patch) \
|
||||
(PROJ_VERSION_NUMBER >= PROJ_COMPUTE_VERSION(maj,min,patch))
|
||||
|
||||
extern char const PROJ_DLL pj_release[]; /* global release id string */
|
||||
|
||||
|
||||
@@ -556,6 +556,9 @@
|
||||
#define EPSG_CODE_METHOD_VERTICALGRID_GTX 1084
|
||||
#define EPSG_NAME_METHOD_VERTICALGRID_GTX "Vertical Offset by Grid Interpolation (gtx)"
|
||||
|
||||
#define EPSG_CODE_METHOD_VERTICALGRID_PL_TXT 1101
|
||||
#define EPSG_NAME_METHOD_VERTICALGRID_PL_TXT "Vertical Offset by Grid Interpolation (PL txt)"
|
||||
|
||||
#define EPSG_NAME_PARAMETER_VERTICAL_OFFSET_FILE "Vertical offset file"
|
||||
#define EPSG_CODE_PARAMETER_VERTICAL_OFFSET_FILE 8732
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user