diff options
Diffstat (limited to 'scripts/grid_checks.py')
| -rwxr-xr-x | scripts/grid_checks.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/grid_checks.py b/scripts/grid_checks.py index 6177fd4a..2a49e9a1 100755 --- a/scripts/grid_checks.py +++ b/scripts/grid_checks.py @@ -4,7 +4,7 @@ # # Project: PROJ # Purpose: Tool to check consistency of database regarding grids and against -# what is available in proj-datumgrid +# what is available in PROJ-data # Author: Even Rouault <even.rouault at spatialys.com> # ############################################################################### @@ -35,7 +35,7 @@ import fnmatch import os import sqlite3 -parser = argparse.ArgumentParser(description='Check database and proj-datumgrid-geotiff consistency.') +parser = argparse.ArgumentParser(description='Check database and PROJ-data consistency.') parser.add_argument('path_to_proj_db', help='Full pathname to proj.db') parser.add_argument('path_to_proj_datumgrid', @@ -44,10 +44,10 @@ parser.add_argument('path_to_proj_datumgrid', group = parser.add_mutually_exclusive_group(required=True) group.add_argument('--not-in-grid-alternatives', dest='not_in_grid_alternatives', action='store_true', help='list grids mentionned in grid_transformation but missing in grid_alternatives') -group.add_argument('--not-in-proj-datumgrid-geotiff', dest='not_in_proj_datum_grid_geotiff', action='store_true', - help='list grids registered in grid_alternatives, but missing in proj-datumgrid') +group.add_argument('--not-in-proj-data', dest='not_in_proj_data', action='store_true', + help='list grids registered in grid_alternatives, but missing in PROJ-data repository') group.add_argument('--not-in-db', dest='not_in_db', action='store_true', - help='list grids in proj-datumgrid, but not registered in grid_alternatives') + help='list grids in PROJ-data repository, but not registered in grid_alternatives') args = parser.parse_args() @@ -64,7 +64,7 @@ if args.not_in_grid_alternatives: for row in res: print(row) -elif args.not_in_proj_datum_grid_geotiff: +elif args.not_in_proj_data: set_grids = set() for root, dirnames, filenames in os.walk(proj_datumgrid): @@ -75,7 +75,7 @@ elif args.not_in_proj_datum_grid_geotiff: res = conn.execute("SELECT DISTINCT proj_grid_name FROM grid_alternatives WHERE open_license is NULL OR open_license != 0") for (grid_name,) in res: if grid_name not in set_grids: - print('ERROR: grid ' + grid_name + ' in grid_alternatives but missing in proj-datumgrid') + print('ERROR: grid ' + grid_name + ' in grid_alternatives but missing in PROJ-data') elif args.not_in_db: @@ -87,13 +87,13 @@ elif args.not_in_db: filename_lower = filename.lower() if '.aux.xml' in filename_lower: continue - if '.gsb' in filename_lower or '.gtx' in filename_lower: + if '.gsb' in filename_lower or '.gtx' in filename_lower or '.tif' in filename_lower: set_grids.add(filename) conn = sqlite3.connect(dbname) for filename in sorted(set_grids): res = conn.execute("SELECT 1 FROM grid_alternatives WHERE proj_grid_name = ?", (filename,)) if not res.fetchone(): - print('WARNING: grid ' + filename + ' in proj-datumgrid but missing in grid_alternatives') + print('WARNING: grid ' + filename + ' in PROJ-data but missing in grid_alternatives') else: raise Exception('unknown mode') |
