aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-01-17 00:24:03 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-01-17 00:52:19 +0100
commit4724025e6c817761052fc0dc8810fd489a9e0104 (patch)
tree21117e52f95b8f36880efef8cd71c1fcec21242c /scripts
parent66fd99a8831955034cb25c8468ecfe1f9d3a7d62 (diff)
parentd76e6202d27c730b4dcbf16b8c1575c11b703485 (diff)
downloadPROJ-4724025e6c817761052fc0dc8810fd489a9e0104.tar.gz
PROJ-4724025e6c817761052fc0dc8810fd489a9e0104.zip
Merge branch 'master' into rfc4_merge_back_master
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_db.py27
-rwxr-xr-xscripts/build_db_create_ignf_from_xml.py3
-rwxr-xr-xscripts/grid_checks.py6
-rw-r--r--scripts/reference_exported_symbols.txt10
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