tecnica:gps_cartografia_gis:georeferencing
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tecnica:gps_cartografia_gis:georeferencing [2011/11/15 10:24] – niccolo | tecnica:gps_cartografia_gis:georeferencing [2011/11/15 10:30] (current) – removed niccolo | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Raster Georeferencing ====== | ||
| - | ===== Georiferire un file PNG ===== | ||
| - | |||
| - | Quei mattacchioni della NASA fanno [[http:// | ||
| - | |||
| - | Bisognerebbe creare un //world file// secondo la struttura documentata da [[http:// | ||
| - | < | ||
| - | gdalinfo TrueMarble.2km.21600x10800.tif | ||
| - | ... | ||
| - | Origin = (-180.000000000000000, | ||
| - | Pixel Size = (0.016666666666667, | ||
| - | ... | ||
| - | </ | ||
| - | |||
| - | Un trucco per creare il world file a partire da un GeoTiff usando i tool gdal è il seguente: | ||
| - | |||
| - | < | ||
| - | gdal_translate -co " | ||
| - | mv temp.tfw TrueMarble.2km.21600x10800.tfw | ||
| - | rm temp.tif | ||
| - | </ | ||
| - | |||
| - | Creiamo il world file con lo stesso nome del file '' | ||
| - | |||
| - | < | ||
| - | 0.0166666667 | ||
| - | 0.0000000000 | ||
| - | 0.0000000000 | ||
| - | -0.0166666667 | ||
| - | -179.9916666667 | ||
| - | 89.9916666667 | ||
| - | </ | ||
| - | |||
| - | Peccato che la velocità di accesso non sia accettabile, | ||
| - | |||
| - | Una **soluzione non ottimale** è quella di convertire in Tiff non compresso con ImageMagick (il world file da usare rimane esattamente lo stesso): | ||
| - | |||
| - | < | ||
| - | convert world_topo_bathy.png -compress none world_topo_bathy.tif | ||
| - | </ | ||
| - | |||
| - | La **soluzione migliore** è creare un **GeoTiff completo**, che non ha bisogno del world file perché incorpora tutte le informazioni geografiche necessarie. A tale scopo si può usare il comando: | ||
| - | |||
| - | < | ||
| - | gdal_translate -a_srs EPSG:4326 world_topo_bathy.png world_topo_bathy.tif | ||
| - | </ | ||
| - | |||
| - | Nel GeoTiff risultante vengono incorporate sie le informazioni relative al sistema di riferimento che quelle contenute nel world file. | ||
| - | |||
| - | ===== Overview Images (piramidi) ===== | ||
| - | |||
| - | Se il file è troppo grande conviene creare le overview, dette anche // | ||
| - | |||
| - | In genere si generano delle copie dell' | ||
| - | |||
| - | < | ||
| - | gdaladdo TrueMarble.8km.5400x2700.tif 2 4 8 | ||
| - | </ | ||
| - | |||
| - | Se invece vogliamo tenere le overview in un file separato (avrà formato //Erdas Image// ed estensione **'' | ||
| - | |||
| - | < | ||
| - | gdaladdo --config USE_RRD YES TrueMarble.8km.5400x2700.tif 2 4 8 | ||
| - | </ | ||
| - | |||
| - | MapServer e la libreria Gdal accedono automaticamente alle overview anche se si trovano nel file separato **'' | ||
tecnica/gps_cartografia_gis/georeferencing.1321352650.txt.gz · Last modified: by niccolo
