From 93bd3c37a3d8a6bb6994cc227f1b1597e372e788 Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Fri, 22 Feb 2019 20:39:53 +1300 Subject: CMake warning about second proj_config.h --- cmake/ProjConfig.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/ProjConfig.cmake b/cmake/ProjConfig.cmake index a97ea9b3..ada827ea 100644 --- a/cmake/ProjConfig.cmake +++ b/cmake/ProjConfig.cmake @@ -37,6 +37,14 @@ set(PACKAGE_TARNAME "proj") set(PACKAGE_URL "https://proj4.org") set(PACKAGE_VERSION "${${PROJECT_INTERN_NAME}_VERSION}") -configure_file(cmake/proj_config.cmake.in src/proj_config.h) +# check if a second proj_config.h exists (created by ./configure) +# as this is within CMake's C_INCLUDES / CXX_INCLUDES +set(AUTOCONF_PROJ_CONFIG_H "${CMAKE_SOURCE_DIR}/src/proj_config.h") +if(EXISTS ${AUTOCONF_PROJ_CONFIG_H}) + message(WARNING "Autoconf's ${AUTOCONF_PROJ_CONFIG_H} may interfere " + "with this CMake build. Run 'make distclean' in the " + "source directory before CMake's build.") +endif() +configure_file(cmake/proj_config.cmake.in src/proj_config.h) -- cgit v1.2.3 From 50cfb37a04c452bbdec2f6ce3c09ee20624ccb7f Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 22 Feb 2019 19:17:54 +0100 Subject: proj.db: update to EPSG 9.6.0 Minor update w.r.t 9.5.5 that adds a few new coordinate operations. --- NEWS | 2 +- data/sql/alias_name.sql | 1 + data/sql/axis.sql | 6 ++++++ data/sql/coordinate_system.sql | 4 ++++ data/sql/helmert_transformation.sql | 9 ++++++++- data/sql/metadata.sql | 4 ++-- data/sql/vertical_crs.sql | 2 ++ data/sql/vertical_datum.sql | 1 + scripts/build_db.py | 10 +++++++++- 9 files changed, 34 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 42a54368..03e11492 100644 --- a/NEWS +++ b/NEWS @@ -23,7 +23,7 @@ which is a new feature), and is now an integral part of PROJ. A unified database of geodetic objects, coordinate reference systems and their metadata, and coordinate operations between those CRS is now available in a SQLite3 database file, proj.db. This includes definitions imported from the -IOGP EPSG dataset (v9.5.5 release), the IGNF (French national mapping agency) +IOGP EPSG dataset (v9.6.0 release), the IGNF (French national mapping agency) geodetic registry and the ESRI projection engine database. PROJ is now the reference software in the "OSGeo C stack" for this CRS and coordinate operation database, whereas previously this functionality was spread over PROJ, GDAL and diff --git a/data/sql/alias_name.sql b/data/sql/alias_name.sql index d0b7ef20..6e84d460 100644 --- a/data/sql/alias_name.sql +++ b/data/sql/alias_name.sql @@ -423,6 +423,7 @@ INSERT INTO "alias_name" VALUES('vertical_datum','EPSG','1216','SRB_VRS12','EPSG INSERT INTO "alias_name" VALUES('vertical_datum','EPSG','1219','MVGC','EPSG'); INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','1218','MGD-2000','EPSG'); INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','1218','MTRF-2000','EPSG'); +INSERT INTO "alias_name" VALUES('vertical_datum','EPSG','1205','Zero Depth Point (ZDP)','EPSG'); INSERT INTO "alias_name" VALUES('vertical_datum','EPSG','1039','NZVD2009','EPSG'); INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','1035','REGCAN95','EPSG'); INSERT INTO "alias_name" VALUES('geodetic_datum','EPSG','6761','HTRS96','EPSG'); diff --git a/data/sql/axis.sql b/data/sql/axis.sql index 76ce8dc0..993668cd 100644 --- a/data/sql/axis.sql +++ b/data/sql/axis.sql @@ -47,6 +47,12 @@ INSERT INTO "axis" VALUES('EPSG','1526','Easting','E','North along 90°W','EPSG' INSERT INTO "axis" VALUES('EPSG','1044','Starboard','x','Starboard','EPSG','1045',1,'EPSG','9001'); INSERT INTO "axis" VALUES('EPSG','1045','Forward','y','Ahead','EPSG','1045',2,'EPSG','9001'); INSERT INTO "axis" VALUES('EPSG','1046','Platform Down','z','Downward','EPSG','1045',3,'EPSG','9001'); +INSERT INTO "axis" VALUES('EPSG','1042','Local northing','n','north','EPSG','1047',1,'EPSG','9001'); +INSERT INTO "axis" VALUES('EPSG','1043','Local easting','e','east','EPSG','1047',2,'EPSG','9001'); +INSERT INTO "axis" VALUES('EPSG','1049','Local northing','n','north','EPSG','1048',1,'EPSG','9002'); +INSERT INTO "axis" VALUES('EPSG','1050','Local easting','e','east','EPSG','1048',2,'EPSG','9002'); +INSERT INTO "axis" VALUES('EPSG','1051','Local depth','d','down','EPSG','1049',1,'EPSG','9001'); +INSERT INTO "axis" VALUES('EPSG','1053','Local depth','d','down','EPSG','1050',1,'EPSG','9002'); INSERT INTO "axis" VALUES('EPSG','1','Easting','E','east','EPSG','4400',1,'EPSG','9001'); INSERT INTO "axis" VALUES('EPSG','2','Northing','N','north','EPSG','4400',2,'EPSG','9001'); INSERT INTO "axis" VALUES('EPSG','3','Easting','E','east','EPSG','4401',1,'EPSG','9062'); diff --git a/data/sql/coordinate_system.sql b/data/sql/coordinate_system.sql index 1e893f65..dfcee1cb 100644 --- a/data/sql/coordinate_system.sql +++ b/data/sql/coordinate_system.sql @@ -22,6 +22,10 @@ INSERT INTO "coordinate_system" VALUES('EPSG','1042','Cartesian',3); INSERT INTO "coordinate_system" VALUES('EPSG','1043','vertical',1); INSERT INTO "coordinate_system" VALUES('EPSG','1044','Cartesian',2); INSERT INTO "coordinate_system" VALUES('EPSG','1045','Cartesian',3); +INSERT INTO "coordinate_system" VALUES('EPSG','1047','Cartesian',2); +INSERT INTO "coordinate_system" VALUES('EPSG','1048','Cartesian',2); +INSERT INTO "coordinate_system" VALUES('EPSG','1049','vertical',1); +INSERT INTO "coordinate_system" VALUES('EPSG','1050','vertical',1); INSERT INTO "coordinate_system" VALUES('EPSG','4400','Cartesian',2); INSERT INTO "coordinate_system" VALUES('EPSG','4401','Cartesian',2); INSERT INTO "coordinate_system" VALUES('EPSG','4402','Cartesian',2); diff --git a/data/sql/helmert_transformation.sql b/data/sql/helmert_transformation.sql index c6adb84d..2ae17749 100644 --- a/data/sql/helmert_transformation.sql +++ b/data/sql/helmert_transformation.sql @@ -1047,7 +1047,7 @@ INSERT INTO "helmert_transformation" VALUES('EPSG','8681','MGI 1901 to WGS 84 (1 INSERT INTO "helmert_transformation" VALUES('EPSG','8688','MGI 1901 to WGS 84 (12)',NULL,NULL,'EPSG','9607','Coordinate Frame rotation (geog2D domain)','EPSG','3906','EPSG','4326','EPSG','3307',1.0,476.08,125.947,417.81,'EPSG','9001',-4.610862,-2.388137,11.942335,'EPSG','9104',9.896638,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0); INSERT INTO "helmert_transformation" VALUES('EPSG','8689','MGI 1901 to Slovenia 1996 (12)',NULL,NULL,'EPSG','9607','Coordinate Frame rotation (geog2D domain)','EPSG','3906','EPSG','4765','EPSG','3307',1.0,476.08,125.947,417.81,'EPSG','9001',-4.610862,-2.388137,11.942335,'EPSG','9104',9.896638,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0); INSERT INTO "helmert_transformation" VALUES('EPSG','8822','MTRF-2000 to WGS 84 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','8818','EPSG','4326','EPSG','1206',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,0); -INSERT INTO "helmert_transformation" VALUES('EPSG','8823','MGI 1901 to WGS 84 (12)',NULL,NULL,'EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','3906','EPSG','4326','EPSG','1050',1.0,489.88,183.912,533.711,'EPSG','9001',5.76545,4.69994,-12.58211,'EPSG','9104',1.00646,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0); +INSERT INTO "helmert_transformation" VALUES('EPSG','8823','MGI 1901 to WGS 84 (13)',NULL,NULL,'EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','3906','EPSG','4326','EPSG','1050',1.0,489.88,183.912,533.711,'EPSG','9001',5.76545,4.69994,-12.58211,'EPSG','9104',1.00646,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0); INSERT INTO "helmert_transformation" VALUES('EPSG','8824','Ain el Abd to MTRF-2000 (1)',NULL,NULL,'EPSG','9607','Coordinate Frame rotation (geog2D domain)','EPSG','4204','EPSG','8818','EPSG','3303',5.0,-61.15,-315.86,-3.51,'EPSG','9001',0.41,0.74,-3.52,'EPSG','9104',1.36,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0); INSERT INTO "helmert_transformation" VALUES('EPSG','8828','RGPF to WGS 84 (1)',NULL,NULL,'EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','4687','EPSG','4326','EPSG','1098',0.5,0.072,-0.507,-0.245,'EPSG','9001',0.0183,-0.0003,0.007,'EPSG','9104',-0.0093,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0); INSERT INTO "helmert_transformation" VALUES('EPSG','8829','Tahiti 79 to RGPF (1)',NULL,NULL,'EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','4690','EPSG','4687','EPSG','3124',0.5,221.525,152.948,176.768,'EPSG','9001',2.3847,1.3896,0.877,'EPSG','9104',11.4741,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0); @@ -1082,6 +1082,13 @@ INSERT INTO "helmert_transformation" VALUES('EPSG','8878','ITRF90 to ETRF2014 (1 INSERT INTO "helmert_transformation" VALUES('EPSG','8879','ITRF89 to ETRF2014 (1)',NULL,NULL,'EPSG','1053','Time-dependent Position Vector tfm (geocentric)','EPSG','4911','EPSG','8401','EPSG','1298',0.0,-30.4,-35.5,130.8,'EPSG','1025',1.785,11.151,-16.43,'EPSG','1031',-8.19,'EPSG','1028',-0.1,0.5,3.3,'EPSG','1027',0.085,0.531,-0.79,'EPSG','1032',-0.12,'EPSG','1030',2010.0,'EPSG','1029',NULL,NULL,NULL,NULL,NULL,0); INSERT INTO "helmert_transformation" VALUES('EPSG','8880','ITRF2014 to ETRF2014 (2)',NULL,NULL,'EPSG','1053','Time-dependent Position Vector tfm (geocentric)','EPSG','7789','EPSG','8401','EPSG','1298',0.0,0.0,0.0,0.0,'EPSG','1025',1.785,11.151,-16.17,'EPSG','1031',0.0,'EPSG','1028',0.0,0.0,0.0,'EPSG','1027',0.085,0.531,-0.77,'EPSG','1032',0.0,'EPSG','1030',2010.0,'EPSG','1029',NULL,NULL,NULL,NULL,NULL,0); INSERT INTO "helmert_transformation" VALUES('EPSG','8886','SVY21 to WGS 84 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4757','EPSG','4326','EPSG','1210',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,0); +INSERT INTO "helmert_transformation" VALUES('EPSG','8889','BGS2005 to ETRS89 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','7798','EPSG','4258','EPSG','1056',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,0); +INSERT INTO "helmert_transformation" VALUES('EPSG','8890','BGS2005 to WGS 84 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','7798','EPSG','4326','EPSG','1056',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,0); +INSERT INTO "helmert_transformation" VALUES('EPSG','8891','LKS92 to ETRS89 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4661','EPSG','4258','EPSG','1139',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,0); +INSERT INTO "helmert_transformation" VALUES('EPSG','8892','LKS94 to ETRS89 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4669','EPSG','4258','EPSG','1145',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,0); +INSERT INTO "helmert_transformation" VALUES('EPSG','8893','SRB_ETRS89 to ETRS89 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','8685','EPSG','4258','EPSG','3534',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,0); +INSERT INTO "helmert_transformation" VALUES('EPSG','8894','SRB_ETRS89 to WGS 84 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','8685','EPSG','4326','EPSG','3534',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,0); +INSERT INTO "helmert_transformation" VALUES('EPSG','8895','CHTRF95 to ETRS89 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4151','EPSG','4258','EPSG','1286',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,0); INSERT INTO "helmert_transformation" VALUES('EPSG','10085','Trinidad 1903 to WGS 84 (2)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4302','EPSG','4326','EPSG','1339',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,0); INSERT INTO "helmert_transformation" VALUES('EPSG','10086','JAD69 to WGS 72 (1)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4242','EPSG','4322','EPSG','3342',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,0); INSERT INTO "helmert_transformation" VALUES('EPSG','10089','Aratu to WGS 84 (5)',NULL,NULL,'EPSG','9603','Geocentric translations (geog2D domain)','EPSG','4208','EPSG','4326','EPSG','2962',7.0,-163.466,317.396,-147.538,'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,0); diff --git a/data/sql/metadata.sql b/data/sql/metadata.sql index 0ddb2eef..7769468a 100644 --- a/data/sql/metadata.sql +++ b/data/sql/metadata.sql @@ -1,2 +1,2 @@ -INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v9.5.5'); -INSERT INTO "metadata" VALUES('EPSG.DATE', '2019-01-21'); +INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v9.6.0'); +INSERT INTO "metadata" VALUES('EPSG.DATE', '2019-02-22'); diff --git a/data/sql/vertical_crs.sql b/data/sql/vertical_crs.sql index 2169846d..53b30572 100644 --- a/data/sql/vertical_crs.sql +++ b/data/sql/vertical_crs.sql @@ -206,8 +206,10 @@ INSERT INTO "vertical_crs" VALUES('EPSG','8266','GVR2000 height',NULL,NULL,'EPSG INSERT INTO "vertical_crs" VALUES('EPSG','8267','GVR2016 height',NULL,NULL,'EPSG','6499','EPSG','1200','EPSG','4454',0); INSERT INTO "vertical_crs" VALUES('EPSG','8357','Baltic 1957 height',NULL,NULL,'EPSG','6499','EPSG','1202','EPSG','1306',0); INSERT INTO "vertical_crs" VALUES('EPSG','8358','Baltic 1957 depth',NULL,NULL,'EPSG','6498','EPSG','1202','EPSG','1306',0); +INSERT INTO "vertical_crs" VALUES('EPSG','8378','EPSG example wellbore local vertical CRS',NULL,NULL,'EPSG','1049','EPSG','1205','EPSG','4393',0); INSERT INTO "vertical_crs" VALUES('EPSG','8434','Macao height',NULL,NULL,'EPSG','6499','EPSG','1210','EPSG','1147',0); INSERT INTO "vertical_crs" VALUES('EPSG','8675','N43 height',NULL,NULL,'EPSG','6499','EPSG','1213','EPSG','4522',0); INSERT INTO "vertical_crs" VALUES('EPSG','8690','SVS2010 height',NULL,NULL,'EPSG','6499','EPSG','1215','EPSG','3307',0); INSERT INTO "vertical_crs" VALUES('EPSG','8691','SRB_VRS12 height',NULL,NULL,'EPSG','6499','EPSG','1216','EPSG','3534',0); INSERT INTO "vertical_crs" VALUES('EPSG','8841','MVGC height',NULL,NULL,'EPSG','6499','EPSG','1219','EPSG','3303',0); +INSERT INTO "vertical_crs" VALUES('EPSG','8897','EPSG example wellbore local vertical CRS (ft)',NULL,NULL,'EPSG','1050','EPSG','1205','EPSG','4393',0); diff --git a/data/sql/vertical_datum.sql b/data/sql/vertical_datum.sql index 9a50b9c7..d7a1a323 100644 --- a/data/sql/vertical_datum.sql +++ b/data/sql/vertical_datum.sql @@ -70,6 +70,7 @@ INSERT INTO "vertical_datum" VALUES('EPSG','1190','Landshaedarkerfi Islands 2004 INSERT INTO "vertical_datum" VALUES('EPSG','1199','Greenland Vertical Reference 2000',NULL,NULL,'EPSG','4461',0); INSERT INTO "vertical_datum" VALUES('EPSG','1200','Greenland Vertical Reference 2016',NULL,NULL,'EPSG','4454',0); INSERT INTO "vertical_datum" VALUES('EPSG','1202','Baltic 1957',NULL,NULL,'EPSG','1306',0); +INSERT INTO "vertical_datum" VALUES('EPSG','1205','EPSG example wellbore vertical datum',NULL,NULL,'EPSG','4393',0); INSERT INTO "vertical_datum" VALUES('EPSG','1210','Macao Height Datum',NULL,NULL,'EPSG','1147',0); INSERT INTO "vertical_datum" VALUES('EPSG','1213','Helsinki 1943',NULL,NULL,'EPSG','4522',0); INSERT INTO "vertical_datum" VALUES('EPSG','1215','Slovenian Vertical System 2010',NULL,NULL,'EPSG','3307',0); diff --git a/scripts/build_db.py b/scripts/build_db.py index 4f09a659..9e164188 100755 --- a/scripts/build_db.py +++ b/scripts/build_db.py @@ -229,7 +229,15 @@ def fill_projected_crs(proj_db_cursor): def fill_compound_crs(proj_db_cursor): #proj_db_cursor.execute( # "INSERT INTO crs SELECT ?, coord_ref_sys_code, coord_ref_sys_kind FROM epsg.epsg_coordinatereferencesystem WHERE coord_ref_sys_kind IN ('compound')", (EPSG_AUTHORITY,)) - proj_db_cursor.execute("INSERT INTO compound_crs SELECT ?, coord_ref_sys_code, coord_ref_sys_name, NULL, NULL, ?, cmpd_horizcrs_code, ?, cmpd_vertcrs_code, ?, area_of_use_code, deprecated FROM epsg.epsg_coordinatereferencesystem WHERE coord_ref_sys_kind IN ('compound')", (EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY)) + + proj_db_cursor.execute("SELECT ?, coord_ref_sys_code, coord_ref_sys_name, NULL, NULL, ?, cmpd_horizcrs_code, ?, cmpd_vertcrs_code, ?, area_of_use_code, deprecated FROM epsg.epsg_coordinatereferencesystem WHERE coord_ref_sys_kind IN ('compound') AND cmpd_horizcrs_code NOT IN (SELECT coord_ref_sys_code FROM epsg.epsg_coordinatereferencesystem WHERE coord_ref_sys_kind = 'engineering')", (EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY)) + for auth_name, code, name, description, scope, horiz_auth_name, horiz_code, vert_auth_name, vert_code, area_of_use_auth_name, area_of_use_code, deprecated in proj_db_cursor.fetchall(): + try: + proj_db_cursor.execute("INSERT INTO compound_crs VALUES (?,?,?,?,?,?,?,?,?,?,?,?)", (auth_name, code, name, description, scope, horiz_auth_name, horiz_code, vert_auth_name, vert_code, area_of_use_auth_name, area_of_use_code, deprecated)) + except sqlite3.IntegrityError as e: + print(e) + print(auth_name, code, name, description, scope, horiz_auth_name, horiz_code, vert_auth_name, vert_code, area_of_use_auth_name, area_of_use_code, deprecated) + raise def fill_helmert_transformation(proj_db_cursor): proj_db_cursor.execute("SELECT coord_op_code, coord_op_name, coord_op_method_code, coord_op_method_name, source_crs_code, target_crs_code, area_of_use_code, coord_op_accuracy, epsg_coordoperation.deprecated FROM epsg.epsg_coordoperation LEFT JOIN epsg.epsg_coordoperationmethod USING (coord_op_method_code) WHERE coord_op_type = 'transformation' AND coord_op_method_code IN (1031, 1032, 1033, 1034, 1035, 1037, 1038, 1039, 1053, 1054, 1055, 1056, 1057, 1058, 1061, 1062, 1063, 1065, 1066, 9603, 9606, 9607, 9636) ") -- cgit v1.2.3 From 24510326837c79f902b040b0987f225af8fcd4f9 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 23 Feb 2019 10:39:23 +0100 Subject: Doc: add minimal documentation for patterson projection --- docs/source/operations/projections/index.rst | 1 + docs/source/operations/projections/patterson.rst | 46 ++++++++++++++++++++++++ docs/source/references.bib | 10 ++++++ 3 files changed, 57 insertions(+) create mode 100644 docs/source/operations/projections/patterson.rst diff --git a/docs/source/operations/projections/index.rst b/docs/source/operations/projections/index.rst index e6ec9076..5e612d9f 100644 --- a/docs/source/operations/projections/index.rst +++ b/docs/source/operations/projections/index.rst @@ -99,6 +99,7 @@ Projections map the spherical 3D space to a flat 2D space. omerc ortel ortho + patterson pconic poly putp1 diff --git a/docs/source/operations/projections/patterson.rst b/docs/source/operations/projections/patterson.rst new file mode 100644 index 00000000..11211a5f --- /dev/null +++ b/docs/source/operations/projections/patterson.rst @@ -0,0 +1,46 @@ +.. _patterson: + +******************************************************************************** +Patterson +******************************************************************************** + +The Patterson projection is a cylindrical map projection designed for +general-purpose mapmaking. + +See :cite:`Patterson2015` + ++---------------------+----------------------------------------------------------+ +| **Classification** | Cylindrical | ++---------------------+----------------------------------------------------------+ +| **Available forms** | Forward and inverse, spherical projection | ++---------------------+----------------------------------------------------------+ +| **Defined area** | Global | ++---------------------+----------------------------------------------------------+ +| **Alias** | patterson | ++---------------------+----------------------------------------------------------+ +| **Domain** | 2D | ++---------------------+----------------------------------------------------------+ +| **Input type** | Geodetic coordinates | ++---------------------+----------------------------------------------------------+ +| **Output type** | Projected coordinates | ++---------------------+----------------------------------------------------------+ + +.. figure:: ./images/patterson.png + :width: 500 px + :align: center + :alt: Patterson + + proj-string: ``+proj=patterson`` + +Parameters +################################################################################ + +.. note:: All parameters are optional for projection. + +.. include:: ../options/lon_0.rst + +.. include:: ../options/R.rst + +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst diff --git a/docs/source/references.bib b/docs/source/references.bib index b36e1e2d..0d9fc8a4 100644 --- a/docs/source/references.bib +++ b/docs/source/references.bib @@ -197,6 +197,16 @@ Url = {https://archive.org/details/DTIC_ADA026294} } +@Article{Patterson2015, + Title = {Introducing the Patterson Cylindrical Projection}, + Author = {Tom Patterson, Bojan Šavrič, Bernhard Jenny}, + Journal = {Cartographic Perspectives}, + Year = {2015}, + Number = {78}, + + Doi = {10.14714/CP78.1270} +} + @article{Ruffhead2016, author = {A. C. Ruffhead}, title = {Introduction to multiple regression equations in datum transformations and their reversibility}, -- cgit v1.2.3 From aefbc02bf1fcbf2c75143ac43889664f269484cb Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 23 Feb 2019 11:32:28 +0100 Subject: Doc: add minimal doumentation for comill / Compact Miller projection --- docs/source/operations/projections/comill.rst | 46 +++++++++++++++++++++++++++ docs/source/operations/projections/index.rst | 1 + docs/source/references.bib | 10 ++++++ 3 files changed, 57 insertions(+) create mode 100644 docs/source/operations/projections/comill.rst diff --git a/docs/source/operations/projections/comill.rst b/docs/source/operations/projections/comill.rst new file mode 100644 index 00000000..94b2695c --- /dev/null +++ b/docs/source/operations/projections/comill.rst @@ -0,0 +1,46 @@ +.. _comill: + +******************************************************************************** +Compact Miller +******************************************************************************** + +The Compact Miller projection is a cylindrical map projection with a +height-to-width ratio of 0.6:1. + +See :cite:`Jenny2014` + ++---------------------+----------------------------------------------------------+ +| **Classification** | Cylindrical | ++---------------------+----------------------------------------------------------+ +| **Available forms** | Forward and inverse, spherical projection | ++---------------------+----------------------------------------------------------+ +| **Defined area** | Global | ++---------------------+----------------------------------------------------------+ +| **Alias** | comill | ++---------------------+----------------------------------------------------------+ +| **Domain** | 2D | ++---------------------+----------------------------------------------------------+ +| **Input type** | Geodetic coordinates | ++---------------------+----------------------------------------------------------+ +| **Output type** | Projected coordinates | ++---------------------+----------------------------------------------------------+ + +.. figure:: ./images/comill.png + :width: 500 px + :align: center + :alt: Compact Miller + + proj-string: ``+proj=comill`` + +Parameters +################################################################################ + +.. note:: All parameters are optional for projection. + +.. include:: ../options/lon_0.rst + +.. include:: ../options/R.rst + +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst diff --git a/docs/source/operations/projections/index.rst b/docs/source/operations/projections/index.rst index 5e612d9f..63752b8c 100644 --- a/docs/source/operations/projections/index.rst +++ b/docs/source/operations/projections/index.rst @@ -31,6 +31,7 @@ Projections map the spherical 3D space to a flat 2D space. cea chamb collg + comill crast denoy eck1 diff --git a/docs/source/references.bib b/docs/source/references.bib index 0d9fc8a4..9039931a 100644 --- a/docs/source/references.bib +++ b/docs/source/references.bib @@ -140,6 +140,16 @@ Doi = {10.5281/zenodo.32050} } +@Article{Jenny2014, + Title = {A compromise aspect-adaptive cylindrical projection for world maps}, + Author = {Bernhard Jenny, Bojan Šavrič, Tom Patterson}, + Journal = {International Journal of Geographical Information Science}, + Year = {2014}, + + Doi = {10.1080/13658816.2014.997734}, + Url = {http://www.cartography.oregonstate.edu/pdf/2015_Jenny_etal_ACompromiseAspect-adaptiveCylindricalProjectionForWorldMaps.pdf} +} + @Article{Karney2013, Title = {Algorithms for geodesics}, Author = {C. F. F. Karney}, -- cgit v1.2.3 From 2d4ff76329ce598e9d11688fa47cc5bd0a9f37af Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Sat, 23 Feb 2019 12:02:16 +0100 Subject: Fix spelling errors. * specfied -> specified --- docs/source/apps/projinfo.rst | 2 +- man/man1/projinfo.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/apps/projinfo.rst b/docs/source/apps/projinfo.rst index af9ed171..fb17e480 100644 --- a/docs/source/apps/projinfo.rst +++ b/docs/source/apps/projinfo.rst @@ -103,7 +103,7 @@ The following control parameters can appear in any order: .. option:: --spatial-test contains|intersects Specify how the area of use of coordinate operations found in the database - are compared to the area of use specfied explicitly with :option:`--area` or :option:`--bbox`, + are compared to the area of use specified explicitly with :option:`--area` or :option:`--bbox`, or derivedi implictly from the area of use of the source and target CRS. By default, projinfo will only keep coordinate operations whose are of use is strictly within the area of interest (``contains`` strategy). diff --git a/man/man1/projinfo.1 b/man/man1/projinfo.1 index fcfe3345..eb15ebc4 100644 --- a/man/man1/projinfo.1 +++ b/man/man1/projinfo.1 @@ -144,7 +144,7 @@ only used for coordinate operation computation .TP .B \-\-spatial\-test contains|intersects Specify how the area of use of coordinate operations found in the database -are compared to the area of use specfied explicitly with \fI\%\-\-area\fP or \fI\%\-\-bbox\fP, +are compared to the area of use specified explicitly with \fI\%\-\-area\fP or \fI\%\-\-bbox\fP, or derivedi implictly from the area of use of the source and target CRS. By default, projinfo will only keep coordinate operations whose are of use is strictly within the area of interest (\fBcontains\fP strategy). -- cgit v1.2.3 From 02849460e7e89a2c8457d6c5fec2cea6b1f17fe1 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 23 Feb 2019 12:53:52 +0100 Subject: Doc: add minimal doumentation for natearth2 projection --- docs/source/operations/projections/index.rst | 1 + docs/source/operations/projections/natearth2.rst | 49 ++++++++++++++++++++++++ docs/source/references.bib | 10 +++++ 3 files changed, 60 insertions(+) create mode 100644 docs/source/operations/projections/natearth2.rst diff --git a/docs/source/operations/projections/index.rst b/docs/source/operations/projections/index.rst index 63752b8c..1e893e97 100644 --- a/docs/source/operations/projections/index.rst +++ b/docs/source/operations/projections/index.rst @@ -89,6 +89,7 @@ Projections map the spherical 3D space to a flat 2D space. murd2 murd3 natearth + natearth2 nell nell_h nicol diff --git a/docs/source/operations/projections/natearth2.rst b/docs/source/operations/projections/natearth2.rst new file mode 100644 index 00000000..ec33141d --- /dev/null +++ b/docs/source/operations/projections/natearth2.rst @@ -0,0 +1,49 @@ +.. _natearth2: + +******************************************************************************** +Natural Earth II +******************************************************************************** ++---------------------+--------------------------------------------------------+ +| **Classification** | Pseudo cylindrical | ++---------------------+--------------------------------------------------------+ +| **Available forms** | Forward and inverse, spherical projection | ++---------------------+--------------------------------------------------------+ +| **Defined area** | Global | ++---------------------+--------------------------------------------------------+ +| **Alias** | natearth2 | ++---------------------+--------------------------------------------------------+ +| **Domain** | 2D | ++---------------------+--------------------------------------------------------+ +| **Input type** | Geodetic coordinates | ++---------------------+--------------------------------------------------------+ +| **Output type** | Projected coordinates | ++---------------------+--------------------------------------------------------+ + + + +.. figure:: ./images/natearth2.png + :width: 500 px + :align: center + :alt: Natural Earth II + + proj-string: ``+proj=natearth2`` + +The Natural Earth II projection is intended for making world maps. At high +latitudes, meridians bend steeply toward short pole lines resulting in a map +with highly rounded corners that resembles an elongated globe + +See :cite:`Savric2016` + + +Parameters +################################################################################ + +.. note:: All parameters for the projection are optional. + +.. include:: ../options/lon_0.rst + +.. include:: ../options/R.rst + +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst diff --git a/docs/source/references.bib b/docs/source/references.bib index 9039931a..fe332eab 100644 --- a/docs/source/references.bib +++ b/docs/source/references.bib @@ -236,6 +236,16 @@ Year = {1993} } +@Article{Savric2016, + Title = {The Natural Earth II world map projection}, + Author = {Bojan Šavrič, Tom Patterson, Bernhard Jenny}, + Journal = {International Journal of Geographical Information Science}, + Year = {2016}, + + Doi = {10.1080/23729333.2015.1093312}, + Url = {http://berniejenny.info/pdf/2016_Savric_etal_NaturalEarthII.pdf} +} + @Article{Savric2018, Author = {B. Šavrič and T. Patterson and B. Jenny}, Title = {The Equal Earth map projection}, -- cgit v1.2.3 From d775b0b07bf8b7f3c78ec259238265d15abac224 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 23 Feb 2019 15:16:56 +0100 Subject: Doc: add minimal documentation for sch projection --- docs/source/operations/projections/index.rst | 1 + docs/source/operations/projections/sch.rst | 65 ++++++++++++++++++++++++++++ docs/source/references.bib | 8 ++++ src/projections/sch.cpp | 2 +- 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 docs/source/operations/projections/sch.rst diff --git a/docs/source/operations/projections/index.rst b/docs/source/operations/projections/index.rst index 1e893e97..b2f57987 100644 --- a/docs/source/operations/projections/index.rst +++ b/docs/source/operations/projections/index.rst @@ -118,6 +118,7 @@ Projections map the spherical 3D space to a flat 2D space. robin rouss rpoly + sch sinu somerc stere diff --git a/docs/source/operations/projections/sch.rst b/docs/source/operations/projections/sch.rst new file mode 100644 index 00000000..f987d75d --- /dev/null +++ b/docs/source/operations/projections/sch.rst @@ -0,0 +1,65 @@ +.. _sch: + +******************************************************************************** +Spherical Cross-track Height +******************************************************************************** ++---------------------+--------------------------------------------------------+ +| **Classification** | Miscellaneous | ++---------------------+--------------------------------------------------------+ +| **Available forms** | Forward and inverse. | ++---------------------+--------------------------------------------------------+ +| **Defined area** | Global | ++---------------------+--------------------------------------------------------+ +| **Alias** | sch | ++---------------------+--------------------------------------------------------+ +| **Domain** | 3D | ++---------------------+--------------------------------------------------------+ +| **Input type** | 3D coordinates | ++---------------------+--------------------------------------------------------+ +| **Output type** | Projected coordinates | ++---------------------+--------------------------------------------------------+ + + proj-string: ``+proj=sch +plat_0=XX +plon_0=XX +phdg_0=XX`` + +The SCH coordinate system is a sensor aligned coordinate system developed at +JPL (Jet Propulsion Laboratory) for radar mapping missions. + +See :cite:`Hensley2002` + + +Parameters +################################################################################ + +Required +------------------------------------------------------------------------------- + +.. option:: +plat_0= + + Peg latitude (in degree) + +.. option:: +plon_0= + + Peg longitude (in degree) + +.. option:: +phdg_0= + + Peg heading (in degree) + +Optional +------------------------------------------------------------------------------- + +.. option:: +h_0= + + Average height (in metre) + + *Defaults to 0.0.* + +.. include:: ../options/lon_0.rst + +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst + +.. include:: ../options/ellps.rst + +.. include:: ../options/R.rst diff --git a/docs/source/references.bib b/docs/source/references.bib index fe332eab..8a0de291 100644 --- a/docs/source/references.bib +++ b/docs/source/references.bib @@ -140,6 +140,14 @@ Doi = {10.5281/zenodo.32050} } +@Article{Hensley2002, + Title = {Improved Processing of AIRSAR Data Based on the GeoSAR Processor}, + Author = {Scott Hensley and Elaine Chapin and Adam Freedman and Thierry Michel}, + Journal = {Airsar earth science and applications workshop}, + Year = {2002}, + Url = {https://airsar.jpl.nasa.gov/documents/workshop2002/papers/T3.pdf} +} + @Article{Jenny2014, Title = {A compromise aspect-adaptive cylindrical projection for world maps}, Author = {Bernhard Jenny, Bojan Šavrič, Tom Patterson}, diff --git a/src/projections/sch.cpp b/src/projections/sch.cpp index f4c66688..c6fb6145 100644 --- a/src/projections/sch.cpp +++ b/src/projections/sch.cpp @@ -215,7 +215,7 @@ PJ *PROJECTION(sch) { return pj_default_destructor(P, PJD_ERR_FAILED_TO_FIND_PROJ); } - /* Check if peg latitude is defined */ + /* Check if peg heading is defined */ if (pj_param(P->ctx, P->params, "tphdg_0").i) Q->phdg = pj_param(P->ctx, P->params, "rphdg_0").f; else { -- cgit v1.2.3 From 25564ae152bfe06e765a49a7d5666645037ad0a5 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 23 Feb 2019 15:41:34 +0100 Subject: Doc: add minimal doumentation for times projection --- docs/plot/plotdefs.json | 11 ++++++ .../source/operations/projections/images/times.png | Bin 0 -> 421132 bytes docs/source/operations/projections/index.rst | 1 + docs/source/operations/projections/times.rst | 43 +++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 docs/source/operations/projections/images/times.png create mode 100644 docs/source/operations/projections/times.rst diff --git a/docs/plot/plotdefs.json b/docs/plot/plotdefs.json index daaf2ef8..8d763f0c 100644 --- a/docs/plot/plotdefs.json +++ b/docs/plot/plotdefs.json @@ -1232,6 +1232,17 @@ "res": "low", "type": "line" }, + { + "filename": "times.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "times", + "projstring": "+proj=times", + "res": "low", + "type": "poly" + }, { "filename": "tissot.png", "latmax": 90, diff --git a/docs/source/operations/projections/images/times.png b/docs/source/operations/projections/images/times.png new file mode 100644 index 00000000..b7d9c481 Binary files /dev/null and b/docs/source/operations/projections/images/times.png differ diff --git a/docs/source/operations/projections/index.rst b/docs/source/operations/projections/index.rst index b2f57987..6ad4c3ff 100644 --- a/docs/source/operations/projections/index.rst +++ b/docs/source/operations/projections/index.rst @@ -126,6 +126,7 @@ Projections map the spherical 3D space to a flat 2D space. gstmerc tcc tcea + times tissot tmerc tobmerc diff --git a/docs/source/operations/projections/times.rst b/docs/source/operations/projections/times.rst new file mode 100644 index 00000000..33e12148 --- /dev/null +++ b/docs/source/operations/projections/times.rst @@ -0,0 +1,43 @@ +.. _times: + +******************************************************************************** +Times +******************************************************************************** + +See :cite:`Snyder1993`, p.213-214. + ++---------------------+----------------------------------------------------------+ +| **Classification** | Cylindrical | ++---------------------+----------------------------------------------------------+ +| **Available forms** | Forward and inverse, spherical projection | ++---------------------+----------------------------------------------------------+ +| **Defined area** | Global | ++---------------------+----------------------------------------------------------+ +| **Alias** | times | ++---------------------+----------------------------------------------------------+ +| **Domain** | 2D | ++---------------------+----------------------------------------------------------+ +| **Input type** | Geodetic coordinates | ++---------------------+----------------------------------------------------------+ +| **Output type** | Projected coordinates | ++---------------------+----------------------------------------------------------+ + +.. figure:: ./images/times.png + :width: 500 px + :align: center + :alt: Times + + proj-string: ``+proj=times`` + +Parameters +################################################################################ + +.. note:: All parameters are optional for projection. + +.. include:: ../options/lon_0.rst + +.. include:: ../options/R.rst + +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst -- cgit v1.2.3 From 55cbf65df79dfa2616aeb337aafcc95afa73273a Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 23 Feb 2019 15:50:30 +0100 Subject: Doc: add minimal doumentation for misrsom projection --- docs/source/operations/projections/index.rst | 1 + docs/source/operations/projections/misrsom.rst | 36 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 docs/source/operations/projections/misrsom.rst diff --git a/docs/source/operations/projections/index.rst b/docs/source/operations/projections/index.rst index 6ad4c3ff..c5b249c9 100644 --- a/docs/source/operations/projections/index.rst +++ b/docs/source/operations/projections/index.rst @@ -84,6 +84,7 @@ Projections map the spherical 3D space to a flat 2D space. merc mil_os mill + misrsom moll murd1 murd2 diff --git a/docs/source/operations/projections/misrsom.rst b/docs/source/operations/projections/misrsom.rst new file mode 100644 index 00000000..bb738fa0 --- /dev/null +++ b/docs/source/operations/projections/misrsom.rst @@ -0,0 +1,36 @@ +.. _misrsom: + +******************************************************************************** +Space oblique for MISR +******************************************************************************** + +.. figure:: ./images/misrsom.png + :width: 500 px + :align: center + :alt: Space oblique for MISR + + proj-string: ``+proj=misrsom +path=1`` + +Parameters +################################################################################ + +Required +-------------------------------------------------------------------------------- + +.. option:: +path= + + Selected path of satellite. Value between 1 and 233. + + +Optional +-------------------------------------------------------------------------------- + +.. include:: ../options/lon_0.rst + +.. include:: ../options/ellps.rst + +.. include:: ../options/R.rst + +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst -- cgit v1.2.3 From 516641cfb6a1797991da1ad10fc40096cf7413ab Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 24 Feb 2019 11:12:37 +0100 Subject: .travis.yml: add build with g++-7 and -D_GLIBCXX_ASSERTIONS (refs #1290) --- .travis.yml | 20 ++++++++++++++++++++ travis/install.sh | 2 +- travis/linux_gcc7/after_success.sh | 5 +++++ travis/linux_gcc7/before_install.sh | 20 ++++++++++++++++++++ travis/linux_gcc7/install.sh | 7 +++++++ 5 files changed, 53 insertions(+), 1 deletion(-) create mode 100755 travis/linux_gcc7/after_success.sh create mode 100755 travis/linux_gcc7/before_install.sh create mode 100755 travis/linux_gcc7/install.sh diff --git a/.travis.yml b/.travis.yml index 137e9afb..bc7e685f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,24 @@ matrix: env: - BUILD_NAME=linux_gcc - DETAILS="linux, gcc" + + - os: linux + dist: trusty + sudo: required + services: + - docker + env: + - BUILD_NAME=linux_gcc7 + - DETAILS="linux, gcc7" + - CC=gcc-7 + - CXX=g++-7 + - CXXFLAGS='-g -D_GLIBCXX_ASSERTIONS' + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: ['g++-7','make','autoconf','automake'] + - os: linux dist: trusty compiler: clang @@ -29,11 +47,13 @@ matrix: env: - BUILD_NAME=linux_clang - DETAILS="linux, clang" + - os: osx language: cpp env: - BUILD_NAME=osx - DETAILS="osx" + - os: linux dist: trusty compiler: gcc diff --git a/travis/install.sh b/travis/install.sh index 2013a610..f5fa7d08 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -23,7 +23,7 @@ cd $TAR_DIRECTORY mkdir build_autoconf cd build_autoconf if [ -f /usr/lib/jvm/java-7-openjdk-amd64/include/jni.h ]; then - CXXFLAGS="-I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/include/linux" ../configure --prefix=/tmp/proj_autoconf_install_from_dist_all --with-jni + CXXFLAGS="-I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/include/linux $CXXFLAGS" ../configure --prefix=/tmp/proj_autoconf_install_from_dist_all --with-jni else ../configure --prefix=/tmp/proj_autoconf_install_from_dist_all fi diff --git a/travis/linux_gcc7/after_success.sh b/travis/linux_gcc7/after_success.sh new file mode 100755 index 00000000..70c6f5cb --- /dev/null +++ b/travis/linux_gcc7/after_success.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +#./travis/after_success.sh diff --git a/travis/linux_gcc7/before_install.sh b/travis/linux_gcc7/before_install.sh new file mode 100755 index 00000000..25c7483f --- /dev/null +++ b/travis/linux_gcc7/before_install.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +./travis/before_install.sh + +sudo apt-get update -qq +sudo apt-get install -y cppcheck +sudo apt-get install -qq lcov +sudo apt-get install -qq doxygen graphviz +sudo apt-get install -qq sqlite3 libsqlite3-dev +sudo apt-get install -qq openjdk-7-jdk + +#scripts/cppcheck.sh +#scripts/doxygen.sh + +#pip install --user sphinxcontrib-bibtex +#pip install --user cpp-coveralls + +#./travis/docker.sh diff --git a/travis/linux_gcc7/install.sh b/travis/linux_gcc7/install.sh new file mode 100755 index 00000000..b957b927 --- /dev/null +++ b/travis/linux_gcc7/install.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +export CCACHE_CPP2=yes + +CC="ccache $CC" CXX="ccache $CXX" CFLAGS="-std=c89 -Werror $CFLAGS" CXXFLAGS="-Werror $CXXFLAGS" ./travis/install.sh -- cgit v1.2.3 From 246ee8c20e0501ef50148db6f2abb9805b9c8a0a Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 24 Feb 2019 12:01:06 +0100 Subject: jniproj.cpp: fix compiler warning --- src/jniproj.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jniproj.cpp b/src/jniproj.cpp index 59b5b2a0..6f441529 100644 --- a/src/jniproj.cpp +++ b/src/jniproj.cpp @@ -279,7 +279,7 @@ JNIEXPORT jcharArray JNICALL Java_org_proj4_PJ_getAxisDirections { PJ *pj = getPJ(env, object); if (pj) { - int length = strlen(pj->axis); + int length = static_cast(strlen(pj->axis)); jcharArray array = env->NewCharArray(length); if (array) { jchar* axis = env->GetCharArrayElements(array, nullptr); -- cgit v1.2.3 From 22a786693f66c815220861f15fd041584d32a1f1 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 24 Feb 2019 12:06:58 +0100 Subject: ParameterValue::_exportToWKT(): fix null pointer dereference with -D_GLIBCXX_ASSERTIONS on WKT with PARAMETERFILE (fixes #1290) --- src/iso19111/coordinateoperation.cpp | 85 +++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/src/iso19111/coordinateoperation.cpp b/src/iso19111/coordinateoperation.cpp index 7b0adc6f..fbb67e6b 100644 --- a/src/iso19111/coordinateoperation.cpp +++ b/src/iso19111/coordinateoperation.cpp @@ -2156,52 +2156,55 @@ void ParameterValue::_exportToWKT(io::WKTFormatter *formatter) const { const bool isWKT2 = formatter->version() == io::WKTFormatter::Version::WKT2; const auto &l_type = type(); - const auto &l_value = value(); - if (formatter->abridgedTransformation() && l_type == Type::MEASURE) { - const auto &unit = l_value.unit(); - const auto &unitType = unit.type(); - if (unitType == common::UnitOfMeasure::Type::LINEAR) { - formatter->add(l_value.getSIValue()); - } else if (unitType == common::UnitOfMeasure::Type::ANGULAR) { - formatter->add( - l_value.convertToUnit(common::UnitOfMeasure::ARC_SECOND)); - } else if (unit == common::UnitOfMeasure::PARTS_PER_MILLION) { - formatter->add(1.0 + l_value.value() * 1e-6); - } else { - formatter->add(l_value.value()); - } - } else if (l_type == Type::MEASURE) { - const auto &unit = l_value.unit(); - if (isWKT2) { - formatter->add(l_value.value()); - } else { - // In WKT1, as we don't output the natural unit, output to the - // registered linear / angular unit. + if (l_type == Type::MEASURE) { + const auto &l_value = value(); + if (formatter->abridgedTransformation()) { + const auto &unit = l_value.unit(); const auto &unitType = unit.type(); if (unitType == common::UnitOfMeasure::Type::LINEAR) { - const auto &targetUnit = *(formatter->axisLinearUnit()); - if (targetUnit.conversionToSI() == 0.0) { - throw io::FormattingException( - "cannot convert value to target linear unit"); - } - formatter->add(l_value.convertToUnit(targetUnit)); + formatter->add(l_value.getSIValue()); } else if (unitType == common::UnitOfMeasure::Type::ANGULAR) { - const auto &targetUnit = *(formatter->axisAngularUnit()); - if (targetUnit.conversionToSI() == 0.0) { - throw io::FormattingException( - "cannot convert value to target angular unit"); - } - formatter->add(l_value.convertToUnit(targetUnit)); + formatter->add( + l_value.convertToUnit(common::UnitOfMeasure::ARC_SECOND)); + } else if (unit == common::UnitOfMeasure::PARTS_PER_MILLION) { + formatter->add(1.0 + l_value.value() * 1e-6); } else { - formatter->add(l_value.getSIValue()); + formatter->add(l_value.value()); } - } - if (isWKT2 && unit != common::UnitOfMeasure::NONE) { - if (!formatter->primeMeridianOrParameterUnitOmittedIfSameAsAxis() || - (unit != common::UnitOfMeasure::SCALE_UNITY && - unit != *(formatter->axisLinearUnit()) && - unit != *(formatter->axisAngularUnit()))) { - unit._exportToWKT(formatter); + } else { + const auto &unit = l_value.unit(); + if (isWKT2) { + formatter->add(l_value.value()); + } else { + // In WKT1, as we don't output the natural unit, output to the + // registered linear / angular unit. + const auto &unitType = unit.type(); + if (unitType == common::UnitOfMeasure::Type::LINEAR) { + const auto &targetUnit = *(formatter->axisLinearUnit()); + if (targetUnit.conversionToSI() == 0.0) { + throw io::FormattingException( + "cannot convert value to target linear unit"); + } + formatter->add(l_value.convertToUnit(targetUnit)); + } else if (unitType == common::UnitOfMeasure::Type::ANGULAR) { + const auto &targetUnit = *(formatter->axisAngularUnit()); + if (targetUnit.conversionToSI() == 0.0) { + throw io::FormattingException( + "cannot convert value to target angular unit"); + } + formatter->add(l_value.convertToUnit(targetUnit)); + } else { + formatter->add(l_value.getSIValue()); + } + } + if (isWKT2 && unit != common::UnitOfMeasure::NONE) { + if (!formatter + ->primeMeridianOrParameterUnitOmittedIfSameAsAxis() || + (unit != common::UnitOfMeasure::SCALE_UNITY && + unit != *(formatter->axisLinearUnit()) && + unit != *(formatter->axisAngularUnit()))) { + unit._exportToWKT(formatter); + } } } } else if (l_type == Type::STRING || l_type == Type::FILENAME) { -- cgit v1.2.3 From 140c64713b451db3456287e338e1ce297a52d047 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 24 Feb 2019 08:02:45 -0500 Subject: Fix data path used by cli tests (#1288) All other tests use PROJ_LIB, and allow it to be overridden from the command-line, so do the same here. --- test/cli/Makefile.am | 20 ++++++++++---------- test/cli/test27 | 7 +++++-- test/cli/test83 | 7 +++++-- test/cli/testIGNF | 3 +-- test/cli/testcct | 1 - test/cli/testdatumfile | 1 - test/cli/testflaky | 1 - test/cli/testntv2 | 1 - test/cli/testprojinfo | 1 - test/cli/testvarious | 3 +-- 10 files changed, 22 insertions(+), 23 deletions(-) diff --git a/test/cli/Makefile.am b/test/cli/Makefile.am index c0bc0871..47cb1e7f 100644 --- a/test/cli/Makefile.am +++ b/test/cli/Makefile.am @@ -1,5 +1,5 @@ # Executables paths passed to test scripts -DATAPATH = ../../data +PROJ_LIB ?= ../../data THIS_DIR = $(top_srcdir)/test/cli EXEPATH = ../../src PROJEXE = $(EXEPATH)/proj @@ -27,7 +27,7 @@ EXTRA_DIST = pj_out27.dist pj_out83.dist td_out.dist \ CMakeLists.txt testprojinfo-check: - PROJ_LIB=$(DATAPATH) $(TESTPROJINFO) $(PROJINFOEXE) + PROJ_LIB=$(PROJ_LIB) $(TESTPROJINFO) $(PROJINFOEXE) test27-check: $(TEST27) $(PROJEXE) @@ -36,24 +36,24 @@ test83-check: $(TEST83) $(PROJEXE) testvarious-check: - PROJ_LIB=$(DATAPATH) $(TESTVARIOUS) $(CS2CSEXE) + PROJ_LIB=$(PROJ_LIB) $(TESTVARIOUS) $(CS2CSEXE) testdatumfile-check: - @if [ -f $(DATAPATH)/conus -a -f $(DATAPATH)/ntv1_can.dat -a -f $(DATAPATH)/MD -a -f $(DATAPATH)/ntf_r93.gsb ]; then \ - PROJ_LIB=$(DATAPATH) $(TESTDATUMFILE) $(CS2CSEXE) ; \ + @if [ -f $(PROJ_LIB)/conus -a -f $(PROJ_LIB)/ntv1_can.dat -a -f $(PROJ_LIB)/MD -a -f $(PROJ_LIB)/ntf_r93.gsb ]; then \ + PROJ_LIB=$(PROJ_LIB) $(TESTDATUMFILE) $(CS2CSEXE) ; \ fi testign-check: - @if [ -f $(DATAPATH)/ntf_r93.gsb ] ; then \ - PROJ_LIB=$(DATAPATH) $(TESTIGN) $(CS2CSEXE) ; \ + @if [ -f $(PROJ_LIB)/ntf_r93.gsb ] ; then \ + PROJ_LIB=$(PROJ_LIB) $(TESTIGN) $(CS2CSEXE) ; \ fi testntv2-check: - @if [ -f $(DATAPATH)/ntv2_0.gsb ] ; then \ - PROJ_LIB=$(DATAPATH) $(TESTNTV2) $(CS2CSEXE) ; \ + @if [ -f $(PROJ_LIB)/ntv2_0.gsb ] ; then \ + PROJ_LIB=$(PROJ_LIB) $(TESTNTV2) $(CS2CSEXE) ; \ fi testcct-check: - PROJ_LIB=$(DATAPATH) $(TESTCCT) $(CCTEXE) + PROJ_LIB=$(PROJ_LIB) $(TESTCCT) $(CCTEXE) check-local: testprojinfo-check test27-check test83-check testvarious-check testdatumfile-check testign-check testntv2-check testcct-check diff --git a/test/cli/test27 b/test/cli/test27 index 43c060d8..421f9044 100755 --- a/test/cli/test27 +++ b/test/cli/test27 @@ -7,7 +7,6 @@ # Mercator due to greater precision of meridional distance function. # TEST_CLI_DIR=`dirname $0` -DATA_DIR=`dirname $0`/../../data EXE=$1 usage() @@ -26,12 +25,16 @@ if test ! -x ${EXE}; then exit 1 fi +if test -z "${PROJ_LIB}"; then + export PROJ_LIB="`dirname $0`/../../data" +fi + echo "============================================" echo "Running ${0} using ${EXE}:" echo "============================================" OUT=proj_out27 -INIT_FILE=${DATA_DIR}/nad27 +INIT_FILE=${PROJ_LIB}/nad27 # echo "doing tests into file ${OUT}, please wait" # diff --git a/test/cli/test83 b/test/cli/test83 index 82b491a7..59793870 100755 --- a/test/cli/test83 +++ b/test/cli/test83 @@ -8,7 +8,6 @@ # Mercator due to greater precision of meridional distance function. # TEST_CLI_DIR=`dirname $0` -DATA_DIR=`dirname $0`/../../data EXE=$1 usage() @@ -27,12 +26,16 @@ if test ! -x ${EXE}; then exit 1 fi +if test -z "${PROJ_LIB}"; then + export PROJ_LIB="`dirname $0`/../../data" +fi + echo "============================================" echo "Running ${0} using ${EXE}:" echo "============================================" OUT=proj_out83 -INIT_FILE=${DATA_DIR}/nad83 +INIT_FILE=${PROJ_LIB}/nad83 # echo "doing tests into file ${OUT}, please wait" # diff --git a/test/cli/testIGNF b/test/cli/testIGNF index 0fa04e84..2b2d5a57 100755 --- a/test/cli/testIGNF +++ b/test/cli/testIGNF @@ -12,7 +12,6 @@ # the gsb grid is still ok TEST_CLI_DIR=`dirname $0` -DATA_DIR=`dirname $0`/../../data EXE=$1 usage() @@ -32,7 +31,7 @@ if test ! -x ${EXE}; then fi if test -z "${PROJ_LIB}"; then - export PROJ_LIB=${DATA_DIR} + export PROJ_LIB="`dirname $0`/../../data" fi echo "============================================" diff --git a/test/cli/testcct b/test/cli/testcct index 93749052..3fb0dd95 100755 --- a/test/cli/testcct +++ b/test/cli/testcct @@ -2,7 +2,6 @@ # Test cct TEST_CLI_DIR=`dirname $0` -DATA_DIR=`dirname $0`/../../data EXE=$1 usage() diff --git a/test/cli/testdatumfile b/test/cli/testdatumfile index e8995150..27c39840 100755 --- a/test/cli/testdatumfile +++ b/test/cli/testdatumfile @@ -4,7 +4,6 @@ # # TEST_CLI_DIR=`dirname $0` -DATA_DIR=`dirname $0`/../../data EXE=$1 usage() diff --git a/test/cli/testflaky b/test/cli/testflaky index af56a9cd..0b823cf6 100755 --- a/test/cli/testflaky +++ b/test/cli/testflaky @@ -4,7 +4,6 @@ # # TEST_CLI_DIR=`dirname $0` -DATA_DIR=`dirname $0`/../../data EXE=$1 usage() diff --git a/test/cli/testntv2 b/test/cli/testntv2 index e82026fc..50b5d0ca 100755 --- a/test/cli/testntv2 +++ b/test/cli/testntv2 @@ -4,7 +4,6 @@ # # TEST_CLI_DIR=`dirname $0` -DATA_DIR=`dirname $0`/../../data EXE=$1 usage() diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo index 08ec9ce4..244e1bd5 100755 --- a/test/cli/testprojinfo +++ b/test/cli/testprojinfo @@ -2,7 +2,6 @@ # Test projinfo TEST_CLI_DIR=`dirname $0` -DATA_DIR=`dirname $0`/../../data EXE=$1 usage() diff --git a/test/cli/testvarious b/test/cli/testvarious index c1fa61df..43b1f63c 100755 --- a/test/cli/testvarious +++ b/test/cli/testvarious @@ -4,7 +4,6 @@ # # TEST_CLI_DIR=`dirname $0` -DATA_DIR=`dirname $0`/../../data EXE=$1 usage() @@ -24,7 +23,7 @@ if test ! -x ${EXE}; then fi if test -z "${PROJ_LIB}"; then - export PROJ_LIB=$DATA_DIR + export PROJ_LIB="`dirname $0`/../../data" fi # Would be great to have a universale way of selecting a locale with -- cgit v1.2.3