From 38de84f38bceed4030710648334729d96f7c2204 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 10 Dec 2019 23:51:03 +0100 Subject: Database: update to IGNF v3.1.0 --- scripts/build_db_create_ignf_from_xml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build_db_create_ignf_from_xml.py b/scripts/build_db_create_ignf_from_xml.py index 6e4ffd1d..7d679d39 100755 --- a/scripts/build_db_create_ignf_from_xml.py +++ b/scripts/build_db_create_ignf_from_xml.py @@ -33,7 +33,8 @@ import os import requests import sys -url = "http://librairies.ign.fr/geoportail/resources/IGNF.xml" +# url = "http://librairies.ign.fr/geoportail/resources/IGNF.xml" +url = "https://geodesie.ign.fr/contenu/fichiers/IGNF.v3.1.0.xml" if len(sys.argv) not in (1, 2) or (len(sys.argv) == 2 and sys.argv[1].startswith('-')): print('Usage: build_db_create_ignf.py [path_to_IGNF.xml]') -- cgit v1.2.3 From ccaebae3cb9424a9b21d0c58237d7e95c9e16b1b Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sat, 14 Dec 2019 10:15:05 +1000 Subject: Add proj_coordoperation_create_inverse to C API (#1795) --- scripts/reference_exported_symbols.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/reference_exported_symbols.txt b/scripts/reference_exported_symbols.txt index e20f29b3..3f4cd51b 100644 --- a/scripts/reference_exported_symbols.txt +++ b/scripts/reference_exported_symbols.txt @@ -801,6 +801,7 @@ proj_context_use_proj4_init_rules proj_convert_conversion_to_other_method proj_coord proj_coord_error() +proj_coordoperation_create_inverse proj_coordoperation_get_accuracy proj_coordoperation_get_grid_used proj_coordoperation_get_grid_used_count -- cgit v1.2.3 From bd9ecbacf575a1926fb8e223c4add1a4cc45d7f3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 16 Dec 2019 15:23:22 +0100 Subject: identify(): take into datum name aliases (fixes #1800) --- scripts/reference_exported_symbols.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/reference_exported_symbols.txt b/scripts/reference_exported_symbols.txt index 3f4cd51b..49d6e5d2 100644 --- a/scripts/reference_exported_symbols.txt +++ b/scripts/reference_exported_symbols.txt @@ -38,6 +38,7 @@ osgeo::proj::common::IdentifiedObject::alias() const osgeo::proj::common::IdentifiedObject::aliases() const osgeo::proj::common::IdentifiedObject::formatID(osgeo::proj::io::WKTFormatter*) const osgeo::proj::common::IdentifiedObject::getEPSGCode() const +osgeo::proj::common::IdentifiedObject::hasEquivalentNameToUsingAlias(osgeo::proj::common::IdentifiedObject const*, std::shared_ptr const&) const osgeo::proj::common::IdentifiedObject::~IdentifiedObject() osgeo::proj::common::IdentifiedObject::IdentifiedObject() osgeo::proj::common::IdentifiedObject::IdentifiedObject(osgeo::proj::common::IdentifiedObject const&) @@ -62,7 +63,7 @@ osgeo::proj::common::Measure::value() const osgeo::proj::common::ObjectDomain::create(osgeo::proj::util::optional const&, std::shared_ptr const&) osgeo::proj::common::ObjectDomain::domainOfValidity() const osgeo::proj::common::ObjectDomain::_exportToWKT(osgeo::proj::io::WKTFormatter*) const -osgeo::proj::common::ObjectDomain::_isEquivalentTo(osgeo::proj::util::IComparable const*, osgeo::proj::util::IComparable::Criterion) const +osgeo::proj::common::ObjectDomain::_isEquivalentTo(osgeo::proj::util::IComparable const*, osgeo::proj::util::IComparable::Criterion, std::shared_ptr const&) const osgeo::proj::common::ObjectDomain::~ObjectDomain() osgeo::proj::common::ObjectDomain::ObjectDomain(osgeo::proj::common::ObjectDomain const&) osgeo::proj::common::ObjectDomain::ObjectDomain(osgeo::proj::util::optional const&, std::shared_ptr const&) @@ -70,7 +71,7 @@ osgeo::proj::common::ObjectDomain::scope() const osgeo::proj::common::ObjectUsage::baseExportToJSON(osgeo::proj::io::JSONFormatter*) const osgeo::proj::common::ObjectUsage::baseExportToWKT(osgeo::proj::io::WKTFormatter*) const osgeo::proj::common::ObjectUsage::domains() const -osgeo::proj::common::ObjectUsage::_isEquivalentTo(osgeo::proj::util::IComparable const*, osgeo::proj::util::IComparable::Criterion) const +osgeo::proj::common::ObjectUsage::_isEquivalentTo(osgeo::proj::util::IComparable const*, osgeo::proj::util::IComparable::Criterion, std::shared_ptr const&) const osgeo::proj::common::ObjectUsage::~ObjectUsage() osgeo::proj::common::ObjectUsage::ObjectUsage() osgeo::proj::common::ObjectUsage::ObjectUsage(osgeo::proj::common::ObjectUsage const&) @@ -263,6 +264,7 @@ osgeo::proj::datum::EngineeringDatum::~EngineeringDatum() osgeo::proj::datum::GeodeticReferenceFrame::create(osgeo::proj::util::PropertyMap const&, dropbox::oxygen::nn > const&, osgeo::proj::util::optional const&, dropbox::oxygen::nn > const&) osgeo::proj::datum::GeodeticReferenceFrame::ellipsoid() const osgeo::proj::datum::GeodeticReferenceFrame::~GeodeticReferenceFrame() +osgeo::proj::datum::GeodeticReferenceFrame::hasEquivalentNameToUsingAlias(osgeo::proj::common::IdentifiedObject const*, std::shared_ptr const&) const osgeo::proj::datum::GeodeticReferenceFrame::primeMeridian() const osgeo::proj::datum::ParametricDatum::create(osgeo::proj::util::PropertyMap const&, osgeo::proj::util::optional const&) osgeo::proj::datum::ParametricDatum::~ParametricDatum() @@ -672,7 +674,7 @@ osgeo::proj::util::Exception::Exception(osgeo::proj::util::Exception const&) osgeo::proj::util::Exception::what() const osgeo::proj::util::GenericName::~GenericName() osgeo::proj::util::IComparable::~IComparable() -osgeo::proj::util::IComparable::isEquivalentTo(osgeo::proj::util::IComparable const*, osgeo::proj::util::IComparable::Criterion) const +osgeo::proj::util::IComparable::isEquivalentTo(osgeo::proj::util::IComparable const*, osgeo::proj::util::IComparable::Criterion, std::shared_ptr const&) const osgeo::proj::util::InvalidValueTypeException::~InvalidValueTypeException() osgeo::proj::util::InvalidValueTypeException::InvalidValueTypeException(osgeo::proj::util::InvalidValueTypeException const&) osgeo::proj::util::LocalName::~LocalName() @@ -961,6 +963,7 @@ proj_is_crs proj_is_deprecated proj_is_derived_crs proj_is_equivalent_to +proj_is_equivalent_to_with_ctx proj_list_angular_units proj_list_destroy proj_list_ellps -- cgit v1.2.3 From 5c179b33499f7317c296e698ade65be22ff51b22 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 20 Dec 2019 11:54:01 +0100 Subject: grid_check.py: fixes --- scripts/grid_checks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/grid_checks.py b/scripts/grid_checks.py index 7883457c..5ed6c0ae 100755 --- a/scripts/grid_checks.py +++ b/scripts/grid_checks.py @@ -140,11 +140,11 @@ elif args.check_filelist: first_line = False continue filename, type, unit, source_crs, target_crs, interpolation_crs, _, _, _ = row - if type == 'DEFORMATION_MODEL': + if type in ('DEFORMATION_MODEL', 'VELOCITY_MODEL'): continue assert type in ('HORIZONTAL_OFFSET', 'VERTICAL_OFFSET_GEOGRAPHIC_TO_VERTICAL', - 'VERTICAL_OFFSET_VERTICAL_TO_VERTICAL') + 'VERTICAL_OFFSET_VERTICAL_TO_VERTICAL'), type set_filenames_from_csv.add(filename) assert filename in set_grids, filename @@ -203,7 +203,7 @@ elif args.check_filelist: e += 360 else: w -= 360 - if filename not in ('c1hpgn.gsb', 'c2hpgn.gsb', 'guhpgn.gsb', 'g2009g01.gtx','g2009s01.gtx','g2012bg0.gtx', ): + if filename not in ('c1hpgn.gsb', 'c2hpgn.gsb', 'guhpgn.gsb', 'g2009g01.gtx','g2009s01.gtx','g2012bg0.gtx', 'MAY76V20.gsb', ): assert grid_w < e, (filename, source_crs, grid_w, e) assert grid_e > w, (filename, source_crs, grid_e, w) assert grid_s < n, (filename, source_crs, grid_s, n) -- cgit v1.2.3 From 3078c6b90fef0dbd88b6884f4d94ade605b0c4ca Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 6 Jan 2020 23:43:09 +0100 Subject: Database: fill alias_name with EPSG aliases for CRS --- scripts/build_db.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'scripts') diff --git a/scripts/build_db.py b/scripts/build_db.py index dbb1c727..05f9a9a9 100755 --- a/scripts/build_db.py +++ b/scripts/build_db.py @@ -561,6 +561,33 @@ def fill_alias(proj_db_cursor): else: print('Cannot find datum %s in geodetic_datum or vertical_datum' % (code)) + proj_db_cursor.execute("SELECT object_code, alias FROM epsg.epsg_alias WHERE object_table_name = 'epsg_coordinatereferencesystem'") + for row in proj_db_cursor.fetchall(): + code, alt_name = row + if int(code) > 60000000: + continue + proj_db_cursor.execute('SELECT 1 FROM geodetic_crs WHERE code = ?', (code,)) + if proj_db_cursor.fetchone() is not None: + proj_db_cursor.execute("INSERT INTO alias_name VALUES ('geodetic_crs','EPSG',?,?,'EPSG')", (code, alt_name)) + continue + + proj_db_cursor.execute('SELECT 1 FROM projected_crs WHERE code = ?', (code,)) + if proj_db_cursor.fetchone() is not None: + proj_db_cursor.execute("INSERT INTO alias_name VALUES ('projected_crs','EPSG',?,?,'EPSG')", (code, alt_name)) + continue + + proj_db_cursor.execute('SELECT 1 FROM vertical_crs WHERE code = ?', (code,)) + if proj_db_cursor.fetchone() is not None: + proj_db_cursor.execute("INSERT INTO alias_name VALUES ('vertical_crs','EPSG',?,?,'EPSG')", (code, alt_name)) + continue + + proj_db_cursor.execute('SELECT 1 FROM compound_crs WHERE code = ?', (code,)) + if proj_db_cursor.fetchone() is not None: + proj_db_cursor.execute("INSERT INTO alias_name VALUES ('compound_crs','EPSG',?,?,'EPSG')", (code, alt_name)) + continue + + print('Cannot find CRS %s in geodetic_crs, projected_crs, vertical_crs or compound_crs' % (code)) + def find_table(proj_db_cursor, code): for table_name in ('helmert_transformation', 'grid_transformation', 'concatenated_operation', 'geodetic_crs', 'projected_crs', 'vertical_crs', 'compound_crs'): -- cgit v1.2.3