Table of Contents
Conversione da Gauss-Boaga Roma40 a WGS84
La libreria PROJ ha nozione del sistema di riferimento EPSG:3003 ed EPSG:3004, (Monte Mario / Italy zone 1 e Monte Mario / Italy zone 2 rispettivamente). Per questi sistemi di riferimento non sono inclusi parametri correttivi per la trasformazione in EPSG:4326 (WGS84). Questo comporta uno shift che può arrivare al centinaio di metri.
È possibile creare delle proiezioni PROJ personalizzate che portano l'accuratezza della trasformazione nel range dei 3-4 metri per l'Italia, è sufficiente aggiungere il parametro correttivo +towgs84
:
+towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 | Italy (Peninsular Part), Accuracy 3-4m |
---|---|
+towgs84=-168.6,-34.0,38.6,-0.374,-0.679,-1.379,-9.48 | Italy (Sardinia), Accuracy 3-4m |
+towgs84=-50.2,-50.4,84.8,-0.690,-2.012,0.459,-28.08 | Italy (Sicily), Accuracy 3-4m |
Questo porta alla definizione di quattro nuovi sistemi di riferimento: Italia zona 1, Italia zona 2, Sardegna e Sicilia.
PROJ
Il pacchetto Debain proj-data fornisce il file /usr/share/proj/epsg (fino a Debian 11 Bullseye, bisogna scoprire in Debian 12 Bookworm come si fa ).
Queste sono le definizioni da aggiungere al file /usr/share/proj/epsg. Vengono usati i codici EPSG da 40000 a 40003, riservati per definire sistemi personalizzati:
# Italy mainland zone 1 GB Roma40 <40000> +proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +units=m +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +no_defs <> # Italy mainland zone 2 GB Roma40 <40001> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl +units=m +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +no_defs <> # Italy Sardinia GB Roma40 <40002> +proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +units=m +towgs84=-168.6,-34.0,38.6,-0.374,-0.679,-1.379,-9.48 +no_defs <> # Italy Sicily GB Roma40 <40003> +proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +units=m +towgs84=-50.2,-50.4,84.8,-0.690,-2.012,0.459,-28.08 +no_defs <>
PostGIS
Se vogliamo definire questi sistemi in un database PostGIS, ecco le INSERT da fare nella tabella spatial_ref_sys
:
INSERT INTO spatial_ref_sys VALUES (40000, 'EPSG', 40000, 'PROJCS["Italy mainland zone 1 Gauss-Boaga Roma40",GEOGCS["Monte Mario",DATUM["Monte_Mario",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","3003"]]', '+proj=tmerc +lat_0=0 +lon_0=9 +k=0.999600 +x_0=1500000 +y_0=0 +ellps=intl +units=m +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +no_defs '); INSERT INTO spatial_ref_sys VALUES (40001, 'EPSG', 40001, 'PROJCS["Italy mainland zone 2 Gauss-Boaga Roma40",GEOGCS["Monte Mario",DATUM["Monte_Mario",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",2520000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","3004"]]', '+proj=tmerc +lat_0=0 +lon_0=15 +k=0.999600 +x_0=2520000 +y_0=0 +ellps=intl +units=m +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +no_defs '); INSERT INTO spatial_ref_sys VALUES (40002, 'EPSG', 40002, 'PROJCS["Italy Sardinia Gauss-Boaga Roma40",GEOGCS["Monte Mario",DATUM["Monte_Mario",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","3003"]]', '+proj=tmerc +lat_0=0 +lon_0=9 +k=0.999600 +x_0=1500000 +y_0=0 +ellps=intl +units=m +towgs84=-168.6,-34.0,38.6,-0.374,-0.679,-1.379,-9.48 +no_defs '); INSERT INTO spatial_ref_sys VALUES (40003, 'EPSG', 40003, 'PROJCS["Italy Sicily Gauss-Boaga Roma40",GEOGCS["Monte Mario",DATUM["Monte_Mario",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","3003"]]', '+proj=tmerc +lat_0=0 +lon_0=9 +k=0.999600 +x_0=1500000 +y_0=0 +ellps=intl +units=m +towgs84=-50.2,-50.4,84.8,-0.690,-2.012,0.459,-28.08 +no_defs ');