diff --git a/copyright_and_licenses.csv b/copyright_and_licenses.csv index 08b39d4..5ec12f3 100644 --- a/copyright_and_licenses.csv +++ b/copyright_and_licenses.csv @@ -187,6 +187,7 @@ fr_ign_RAMG2016.tif,Institut Géographique National (IGN) France,Open License Fr fr_ign_RAR07_bl.tif,Institut Géographique National (IGN) France,Open License France - https://www.etalab.gouv.fr/wp-content/uploads/2014/05/Open_Licence.pdf,, fr_ign_RASPM2018.tif,Institut Géographique National (IGN) France,Open License France - https://www.etalab.gouv.fr/wp-content/uploads/2014/05/Open_Licence.pdf,, fr_ign_README.txt,Disclaimed,Public domain,, +fr_ign_RGM04versRGM23.tif,Institut Géographique National (IGN) France,Open License France - https://www.etalab.gouv.fr/wp-content/uploads/2014/05/Open_Licence.pdf,1.21, hu_bme_geoid2014.tif,Budapest University of Technology and Economics - Department of Geodesy and Surveying,CC-BY-SA-4.0,, hu_bme_hd72corr.tif,Budapest University of Technology and Economics - Department of Geodesy and Surveying,CC-BY-SA-4.0,, hu_bme_README.txt,Disclaimed,Public domain,, diff --git a/files.geojson b/files.geojson index 0ff68d1..a221f25 100644 --- a/files.geojson +++ b/files.geojson @@ -139,7 +139,7 @@ { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fi_nls_n43_n60.json", "name": "fi_nls_n43_n60.json", "area_of_use": "Finland - mainland south of 66°N", "type": "TRIANGULATION", "source": "National Land Survey of Finland (MML)", "source_country": "Finland", "source_id": "fi_nls", "source_url": "https://www.maanmittauslaitos.fi", "description": "N43 height (EPSG:8675) to N60 height (EPSG:5717), with interpolation CRS being YKJ (EPSG:2393), with easting/northing order (version 1.0)", "file_size": 185763, "sha256sum": "b0c0c5eecfd8455ea51ae8a06554e522daecb7e5362fde04de9866e7f1bfd21b" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 20.95, 59.75 ], [ 31.59, 59.75 ], [ 31.59, 66.73 ], [ 20.95, 66.73 ], [ 20.95, 59.75 ] ] ] } }, { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fi_nls_n60_n2000.json", "name": "fi_nls_n60_n2000.json", "area_of_use": "Finland - onshore", "type": "TRIANGULATION", "source": "National Land Survey of Finland (MML)", "source_country": "Finland", "source_id": "fi_nls", "source_url": "https://www.maanmittauslaitos.fi", "description": "N60 height (EPSG:5717) to N2000 height(EPSG:3900), with interpolation CRS being YKJ (EPSG:2393), with easting/northing order (version 1.0)", "file_size": 42394, "sha256sum": "761f54ed3d14f8da6ce8d376e18ebba6bc7c227cb9fda034960b0cf124f9194c" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 19.24, 59.75 ], [ 31.59, 59.75 ], [ 31.59, 70.04 ], [ 19.24, 70.04 ], [ 19.24, 59.75 ] ] ] } }, { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fi_nls_ykj_etrs35fin.json", "name": "fi_nls_ykj_etrs35fin.json", "area_of_use": "Finland - onshore", "type": "TRIANGULATION", "source": "National Land Survey of Finland (MML)", "source_country": "Finland", "source_id": "fi_nls", "source_url": "https://www.maanmittauslaitos.fi", "description": "Triangulation to transform coordinates from YKJ (EPSG:2393), with easting/northing order, to ETRS35FIN (EPSG:3067) (version 1.0)", "file_size": 65772, "sha256sum": "2ce793e4fc215d479da916d0888fe6e45cfdc91c4d41b0aa79351be4dac723dc" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 19.24, 59.75 ], [ 31.59, 59.75 ], [ 31.59, 70.04 ], [ 19.24, 70.04 ], [ 19.24, 59.75 ] ] ] } }, -{ "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_README.txt", "name": "fr_ign_README.txt", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "file_size": 5500, "sha256sum": "d8e92864327537c0ac370bc7ba1665df6be2f27ce4d70d5c13ea66cc4d0a722e" }, "geometry": null }, +{ "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_README.txt", "name": "fr_ign_README.txt", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "file_size": 6028, "sha256sum": "101d95e495aee3d3801e156e82c7044c4e431049d55f5747cba74be7f6a8ce78" }, "geometry": null }, { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_CGVD2013RGSPM06.tif", "name": "fr_ign_CGVD2013RGSPM06.tif", "area_of_use": "France - Saint-Pierre et Miquelon", "type": "VERTICAL_OFFSET_GEOGRAPHIC_TO_VERTICAL", "source_crs_code": "EPSG:4466", "source_crs_name": "RGSPM06", "target_crs_code": "EPSG:6647", "target_crs_name": "CGVD2013(CGG2013) height", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "description": "RGSPM06 (EPSG:4466) to CGVD2013(CGG2013) height (EPSG:6647)", "file_size": 2615, "sha256sum": "ae264da1e06c7d6f7177aa68db463ea9e7614e53805edc1d8596ea78881d6429" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -56.55, 46.45 ], [ -55.95, 46.45 ], [ -55.95, 47.2833333 ], [ -56.55, 47.2833333 ], [ -56.55, 46.45 ] ] ] } }, { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_RAC09.tif", "name": "fr_ign_RAC09.tif", "area_of_use": "France - Corsica", "type": "VERTICAL_OFFSET_GEOGRAPHIC_TO_VERTICAL", "source_crs_code": "EPSG:4965", "source_crs_name": "RGF93 v1", "target_crs_code": "EPSG:5721", "target_crs_name": "NGF-IGN78 height", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "description": "RGF93 (EPSG:4965) to NGF-IGN78 height (EPSG:5721)", "file_size": 8597, "sha256sum": "a1519cc41df3e1a6dbd8135782cca0cd6359f0cb5ec5e52cb531e4f567e59cdd" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 8.4166667, 41.2 ], [ 9.7166667, 41.2 ], [ 9.7166667, 43.2 ], [ 8.4166667, 43.2 ], [ 8.4166667, 41.2 ] ] ] } }, { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_RAC23.tif", "name": "fr_ign_RAC23.tif", "area_of_use": "France - Corsica", "type": "VERTICAL_OFFSET_GEOGRAPHIC_TO_VERTICAL", "source_crs_code": "EPSG:9781", "source_crs_name": "RGF93 v2b", "target_crs_code": "EPSG:5721", "target_crs_name": "NGF-IGN78 height", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "description": "RGF93 v2b (EPSG:9781) to NGF-IGN78 height (EPSG:5721)", "file_size": 9162, "sha256sum": "075c061558c091f0e188256d62523e95b00deb90e2436550581f041b60811bab", "version_added": "1.17" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 8.38333, 41.2 ], [ 9.7499967, 41.2 ], [ 9.7499967, 43.25 ], [ 8.38333, 43.25 ], [ 8.38333, 41.2 ] ] ] } }, @@ -155,6 +155,7 @@ { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_RAMG2016.tif", "name": "fr_ign_RAMG2016.tif", "area_of_use": "France - Antilles - Marie Galante", "type": "VERTICAL_OFFSET_GEOGRAPHIC_TO_VERTICAL", "source_crs_code": "EPSG:5488", "source_crs_name": "RGAF09", "target_crs_code": "EPSG:5617", "target_crs_name": "IGN 1988 MG height", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "description": "RGAF09 (EPSG:5488) to IGN 1988 MG height (EPSG:5617)", "file_size": 6920, "sha256sum": "2aa7dde4ed1008a965689455fda7be624e0f0657206bc0b181a64793ddcea25a" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -61.4, 15.8 ], [ -61.07, 15.8 ], [ -61.07, 16.13 ], [ -61.4, 16.13 ], [ -61.4, 15.8 ] ] ] } }, { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_RAR07_bl.tif", "name": "fr_ign_RAR07_bl.tif", "area_of_use": "France - La Reunion", "type": "VERTICAL_OFFSET_GEOGRAPHIC_TO_VERTICAL", "source_crs_code": "EPSG:4971", "source_crs_name": "RGR92", "target_crs_code": "EPSG:5758", "target_crs_name": "Reunion 1989 height", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "description": "RGR92 (EPSG:4971) to Reunion 1989 height (EPSG:5758)", "file_size": 10378, "sha256sum": "730aea12ee8642561d5c3bf26ffc023222e349bfcdf6ee676f999a875531d4a4" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 55.14, -21.5 ], [ 55.94, -21.5 ], [ 55.94, -20.75 ], [ 55.14, -20.75 ], [ 55.14, -21.5 ] ] ] } }, { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_RASPM2018.tif", "name": "fr_ign_RASPM2018.tif", "area_of_use": "France - Saint-Pierre et Miquelon", "type": "VERTICAL_OFFSET_GEOGRAPHIC_TO_VERTICAL", "source_crs_code": "EPSG:4466", "source_crs_name": "RGSPM06", "target_crs_code": "EPSG:5792", "target_crs_name": "Danger 1950 height", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "description": "RGSPM06 (EPSG:4466) to Danger 1950 height (EPSG:5792)", "file_size": 53052, "sha256sum": "93f500295f175aa9b69092f169e8ea70173021c3a2b4d3623c4eedc49b1fbcbb" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -56.52, 46.48 ], [ -56.0, 46.48 ], [ -56.0, 47.29 ], [ -56.52, 47.29 ], [ -56.52, 46.48 ] ] ] } }, +{ "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_RGM04versRGM23.tif", "name": "fr_ign_RGM04versRGM23.tif", "area_of_use": "Mayotte", "type": "GEOCENTRIC_TRANSLATION", "source_crs_code": "EPSG:4468", "source_crs_name": "RGM04", "target_crs_code": "EPSG:10669", "target_crs_name": "RGM23", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "description": "Geocentric translation from RGM04 (EPSG:4468) to RGM23 (EPSG:10669)", "file_size": 9952, "sha256sum": "0ad51d816048e8ef0e2d419e45f0f71777e8396f3511a6907130373d7da8a7a8", "version_added": "1.21" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 45.0, -13.02 ], [ 45.32, -13.02 ], [ 45.32, -12.62 ], [ 45.0, -12.62 ], [ 45.0, -13.02 ] ] ] } }, { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_gg10_sbv2.tif", "name": "fr_ign_gg10_sbv2.tif", "area_of_use": "France - Antilles - Saint Barthelemy", "type": "VERTICAL_OFFSET_GEOGRAPHIC_TO_VERTICAL", "source_crs_code": "EPSG:5488", "source_crs_name": "RGAF09", "target_crs_code": "EPSG:5619", "target_crs_name": "IGN 1988 SB height", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "description": "RGAF09 (EPSG:5488) to IGN 1988 SB height (EPSG:5619)", "file_size": 2063, "sha256sum": "b5695bb9ef48a8d97ce2acf075a33a61e7717552d389301489d1cdb147104105" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -63.0, 17.8 ], [ -62.725, 17.8 ], [ -62.725, 18.025 ], [ -63.0, 18.025 ], [ -63.0, 17.8 ] ] ] } }, { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_gg10_smv2.tif", "name": "fr_ign_gg10_smv2.tif", "area_of_use": "France - Antilles - Saint Martin", "type": "VERTICAL_OFFSET_GEOGRAPHIC_TO_VERTICAL", "source_crs_code": "EPSG:5488", "source_crs_name": "RGAF09", "target_crs_code": "EPSG:5620", "target_crs_name": "IGN 1988 SM height", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "description": "RGAF09 (EPSG:5488) to IGN 1988 SM height (EPSG:5620)", "file_size": 2069, "sha256sum": "2c2abb2362b90281239074a2552b7692959434e1722b33d04498c2a5bac3ed91" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -63.2, 18.0 ], [ -62.9, 18.0 ], [ -62.9, 18.2 ], [ -63.2, 18.2 ], [ -63.2, 18.0 ] ] ] } }, { "type": "Feature", "properties": { "url": "https://cdn.proj.org/fr_ign_ggg00_lsv2.tif", "name": "fr_ign_ggg00_lsv2.tif", "area_of_use": "France - Antilles - Les Saintes", "type": "VERTICAL_OFFSET_GEOGRAPHIC_TO_VERTICAL", "source_crs_code": "EPSG:4557", "source_crs_name": "RRAF 1991", "target_crs_code": "EPSG:5616", "target_crs_name": "IGN 1988 LS height", "source": "IGN France", "source_country": "France", "source_id": "fr_ign", "source_url": "http://www.ign.fr/", "description": "RRAF 1991 (EPSG:4557) to IGN 1988 LS height (EPSG:5616)", "file_size": 1065, "sha256sum": "c67cab5d85d33ca23f82a2d8d0cc619bf5ee04bcc5f845174dd21813b13a8dbc" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -61.7, 15.8 ], [ -61.475, 15.8 ], [ -61.475, 15.925 ], [ -61.7, 15.925 ], [ -61.7, 15.8 ] ] ] } }, diff --git a/fr_ign/fr_ign_README.txt b/fr_ign/fr_ign_README.txt index c1f470e..96d4036 100644 --- a/fr_ign/fr_ign_README.txt +++ b/fr_ign/fr_ign_README.txt @@ -25,6 +25,16 @@ Grid transformation from NTF to RGF93 in France. * fr_ign_gr3df97a.tif +### Mayotte: RGM04 -> RGM23 (using Geocentric correction) + +Grid transformation from RGM04 to RGM23 in Mayotte. + +*Source*: [IGN](http://www.ign.fr/) +*Format*: GeoTIFF converted from https://geodesie.ign.fr/contenu/fichiers/documentation/RGM04versRGM23.txt +*License*: [License Ouverte (in French)](https://www.etalab.gouv.fr/wp-content/uploads/2017/04/ETALAB-Licence-Ouverte-v2.0.pdf) / [Open License (English translation)](https://www.etalab.gouv.fr/wp-content/uploads/2014/05/Open_Licence.pdf) + +* fr_ign_RGM04versRGM23.tif + ### French vertical grids *Source*: [IGN France](https://geodesie.ign.fr/index.php?page=grilles) diff --git a/fr_ign/fr_ign_RGM04versRGM23.tif b/fr_ign/fr_ign_RGM04versRGM23.tif new file mode 100644 index 0000000..cf02adc Binary files /dev/null and b/fr_ign/fr_ign_RGM04versRGM23.tif differ diff --git a/grid_tools/convert_RGM04versRGM23.py b/grid_tools/convert_RGM04versRGM23.py new file mode 100755 index 0000000..7ed5e33 --- /dev/null +++ b/grid_tools/convert_RGM04versRGM23.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python +############################################################################### +# Project: PROJ +# Purpose: Convert IGN France geocentric RGM04versRGM23.txt grid +# Author: Even Rouault +# +############################################################################### +# Copyright (c) 2025, Even Rouault +# +# SPDX-License-Identifier: MIT +############################################################################### + +from osgeo import gdal +from osgeo import osr +import datetime +import struct + +# https://geodesie.ign.fr/contenu/fichiers/documentation/RGM04versRGM23.txt + +with open('RGM04versRGM23.txt', 'rt') as f: + count_val_rows = 0 + for line_no, l in enumerate(f.readlines()): + if l[-1] == '\n': + l = l[0:-1] + if l[-1] == '\r': + l = l[0:-1] + if line_no == 0: + assert l.startswith(' GR3D ') + elif line_no == 1: + assert l.startswith(' GR3D1 ') + tokens = [] + for t in l.split(' '): + if t: + tokens.append(t) + assert len(tokens) == 7 + minx = float(tokens[1]) + maxx = float(tokens[2]) + miny = float(tokens[3]) + maxy = float(tokens[4]) + resx = float(tokens[5]) + resy = float(tokens[6]) + assert minx < maxx + assert miny < maxy + assert resx > 0 + assert resy > 0 + cols = 1 + (maxx - minx) / resx + assert cols - int(cols + 0.5) < 1e-10 + cols = int(cols + 0.5) + rows = 1 + (maxy - miny) / resy + assert rows - int(rows + 0.5) < 1e-10 + rows = int(rows + 0.5) + ds = gdal.GetDriverByName('GTiff').Create( + '/vsimem/gr3df97a.tif', cols, rows, 3, gdal.GDT_Float32) + ds.SetMetadataItem( + 'TIFFTAG_COPYRIGHT', 'Derived from work by IGN France. Open License https://www.etalab.gouv.fr/wp-content/uploads/2014/05/Open_Licence.pdf') + ds.SetMetadataItem('TIFFTAG_IMAGEDESCRIPTION', + 'Geocentric translation from RGM04 (EPSG:4468) to RGM23 (EPSG:10669). Converted from RGM04versRGM23.txt') + datetime = datetime.date.today().strftime("%Y:%m:%d %H:%M:%S") + ds.SetMetadataItem('TIFFTAG_DATETIME', datetime) + ds.SetMetadataItem('AREA_OR_POINT', 'Point') + ds.SetMetadataItem('TYPE', 'GEOCENTRIC_TRANSLATION') + ds.SetMetadataItem('area_of_use', 'Mayotte') + ds.SetMetadataItem('source_crs_epsg_code', '4468') + ds.SetMetadataItem('target_crs_epsg_code', '10669') + ds.SetGeoTransform( + [minx - resx/2, resx, 0, maxy + resy/2, 0, -resy]) + ds.GetRasterBand(1).SetUnitType('metre') + ds.GetRasterBand(1).SetDescription('x_translation') + ds.GetRasterBand(2).SetUnitType('metre') + ds.GetRasterBand(2).SetDescription('y_translation') + ds.GetRasterBand(3).SetUnitType('metre') + ds.GetRasterBand(3).SetDescription('z_translation') + sr = osr.SpatialReference() + sr.ImportFromEPSG(10671) # RGM23 + ds.SetProjection(sr.ExportToWkt()) + elif line_no == 2: + assert l.startswith(' GR3D2 ') + elif line_no == 3: + assert l.startswith(' GR3D3 ') + else: + tokens = [] + for t in l.split(' '): + if t: + tokens.append(t) + assert len(tokens) == 6 + lon = float(tokens[0]) + lat = float(tokens[1]) + dx = float(tokens[2]) + dy = float(tokens[3]) + dz = float(tokens[4]) + iy = (line_no - 4) % rows + ix = (line_no - 4) // rows + assert abs(lon - (minx + ix * resx) + ) < 1e-10, (line_no, lon, minx + ix * resx) + assert abs(lat - (miny + iy * resy) + ) < 1e-10, (line_no, lat, miny + iy * resy) + ds.GetRasterBand(1).WriteRaster( + ix, rows - iy - 1, 1, 1, struct.pack('f', dx)) + ds.GetRasterBand(2).WriteRaster( + ix, rows - iy - 1, 1, 1, struct.pack('f', dy)) + ds.GetRasterBand(3).WriteRaster( + ix, rows - iy - 1, 1, 1, struct.pack('f', dz)) + count_val_rows += 1 + + assert count_val_rows == rows * cols + gdal.GetDriverByName('GTiff').CreateCopy('fr_ign_RGM04versRGM23.tif', ds, options=[ + 'COMPRESS=DEFLATE', 'PREDICTOR=3', 'INTERLEAVE=BAND']) diff --git a/index.html b/index.html index 7f8dc50..c7acbe9 100644 --- a/index.html +++ b/index.html @@ -661,7 +661,7 @@

Content

  • fi_nls_n60_n2000.json - N60 height (EPSG:5717) to N2000 height(EPSG:3900), with interpolation CRS being YKJ (EPSG:2393), with easting/northing order (version 1.0). Last modified: 2020-10-24
  • fi_nls_ykj_etrs35fin.json - Triangulation to transform coordinates from YKJ (EPSG:2393), with easting/northing order, to ETRS35FIN (EPSG:3067) (version 1.0). Last modified: 2020-10-24

  • IGN France