diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-01-22 14:09:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-22 14:09:35 +0100 |
| commit | a95431d8666db9953115a3a824db396f8aa82b52 (patch) | |
| tree | 21117e52f95b8f36880efef8cd71c1fcec21242c /scripts | |
| parent | c5fb54168665d41503ef3a08f0534da58949b632 (diff) | |
| parent | 4724025e6c817761052fc0dc8810fd489a9e0104 (diff) | |
| download | PROJ-a95431d8666db9953115a3a824db396f8aa82b52.tar.gz PROJ-a95431d8666db9953115a3a824db396f8aa82b52.zip | |
Merge pull request #1855 from rouault/rfc4_merge_back_master
[RFC4_dev] Merge master back to rfc4 latest branch
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/build_db.py | 27 | ||||
| -rwxr-xr-x | scripts/build_db_create_ignf_from_xml.py | 3 | ||||
| -rwxr-xr-x | scripts/grid_checks.py | 6 | ||||
| -rw-r--r-- | scripts/reference_exported_symbols.txt | 10 |
4 files changed, 39 insertions, 7 deletions
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'): 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]') 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) diff --git a/scripts/reference_exported_symbols.txt b/scripts/reference_exported_symbols.txt index 1774b79b..07043504 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<osgeo::proj::io::DatabaseContext> 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<std::string> const&, std::shared_ptr<osgeo::proj::metadata::Extent> 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<osgeo::proj::io::DatabaseContext> 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<std::string> const&, std::shared_ptr<osgeo::proj::metadata::Extent> 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<osgeo::proj::io::DatabaseContext> 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<std::shared_ptr<osgeo::proj::datum::Ellipsoid> > const&, osgeo::proj::util::optional<std::string> const&, dropbox::oxygen::nn<std::shared_ptr<osgeo::proj::datum::PrimeMeridian> > 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<osgeo::proj::io::DatabaseContext> const&) const osgeo::proj::datum::GeodeticReferenceFrame::primeMeridian() const osgeo::proj::datum::ParametricDatum::create(osgeo::proj::util::PropertyMap const&, osgeo::proj::util::optional<std::string> const&) osgeo::proj::datum::ParametricDatum::~ParametricDatum() @@ -692,7 +694,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<osgeo::proj::io::DatabaseContext> const&) const osgeo::proj::util::InvalidValueTypeException::~InvalidValueTypeException() osgeo::proj::util::InvalidValueTypeException::InvalidValueTypeException(osgeo::proj::util::InvalidValueTypeException const&) osgeo::proj::util::LocalName::~LocalName() @@ -838,6 +840,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 @@ -1004,6 +1007,7 @@ proj_is_deprecated proj_is_derived_crs proj_is_download_needed proj_is_equivalent_to +proj_is_equivalent_to_with_ctx proj_list_angular_units proj_list_destroy proj_list_ellps |
