GDAL: Unterschied zwischen den Versionen
Aus Geoinformation HSR
Stefan (Diskussion | Beiträge) |
Stefan (Diskussion | Beiträge) K (→gdal_merge for merging) |
||
(19 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
− | Rasterformate-Bibliothek | + | GDAL (ausgesprochen "Gudel") ist eine Rasterformate-Bibliothek (C++ Open Source von Frank Warmerdam) die typischerweise über die Kommandozeile gesteuert werden. |
Siehe auch: | Siehe auch: | ||
+ | * [[GDAL - Tipps und Tricks]] | ||
* [[OGR]] | * [[OGR]] | ||
+ | * [[GIS-Datei-Format]]e | ||
Alternative Rasterdaten-Konverter: | Alternative Rasterdaten-Konverter: | ||
Zeile 9: | Zeile 11: | ||
== Dokumentation == | == Dokumentation == | ||
+ | Weblinks: | ||
* [http://www.gdal.org/ GDAL-Startseite] | * [http://www.gdal.org/ GDAL-Startseite] | ||
* [http://trac.osgeo.org/gdal/wiki/UserDocs/RasterProcTutorial Tutorial] (gut!) | * [http://trac.osgeo.org/gdal/wiki/UserDocs/RasterProcTutorial Tutorial] (gut!) | ||
Zeile 14: | Zeile 17: | ||
== Formate == | == Formate == | ||
+ | |||
+ | Often used formats: | ||
+ | # GeoTIFF | ||
+ | # HGT | ||
+ | # (VRT - s special GDAL file for input which points to the 'real' files) | ||
+ | # (JPG/JPEG is a lossy file format suited for images but not for grid files like DTMs. Note that JPEG is also a compression option inside TIFF!) | ||
Hier ein Auszug aus den verfügbaren Rasterformate ('ro' is read-only driver; 'rw' is read or write (ie. supports CreateCopy); 'rw+' is read, write and update (ie. supports Create)): | Hier ein Auszug aus den verfügbaren Rasterformate ('ro' is read-only driver; 'rw' is read or write (ie. supports CreateCopy); 'rw+' is read, write and update (ie. supports Create)): | ||
Zeile 36: | Zeile 45: | ||
* WCS (ro): OGC Web Coverage Service | * WCS (ro): OGC Web Coverage Service | ||
* WMS (ro): OGC Web Map Service | * WMS (ro): OGC Web Map Service | ||
+ | |||
+ | == GDAL How To == | ||
+ | |||
+ | == gdal_translate for format conversion == | ||
+ | |||
+ | gdal_translate -of XYZ elevation.tif elevation.xyz | ||
+ | |||
+ | === gdal_merge for merging maps === | ||
+ | |||
+ | gdal_merge -o eins.tif -co TILED=YES -co COMPRESS=LZW --optfile _filelist.txt -n 0 -init 255 | ||
+ | |||
+ | Note the use of -n 0 when merging to treat areas of zero value as nodata. The gdalwarp commands are used in this case to transform to WGS84 so the images will be in a common coordinate system. | ||
+ | |||
+ | === gdal_warp for coordinate transformation === | ||
+ | |||
+ | gdalwarp img1.img img1_wgs84.img -t_srs WGS84 | ||
+ | gdalwarp img2.img img2_wgs84.img -t_srs WGS84 | ||
+ | gdal_merge.py img1_wgs84.img img2_wgs84.img -o mosaic.tif -n 0 | ||
+ | |||
+ | === gdaladdo for generating tile pyramids === | ||
+ | |||
+ | gdaladdo -r gauss C:\SG.tif 2 4 8 16 32 64 128 256 | ||
+ | |||
+ | === GeoTiff Compression for Dummies === | ||
+ | |||
+ | Blog post: http://blog.cleverelephant.ca/2015/02/geotiff-compression-for-dummies.html | ||
+ | |||
+ | === GDAL and Python === | ||
+ | |||
+ | See [[Geoprocessing mit Python]] | ||
+ | |||
+ | |||
+ | [[Kategorie:Raster]] [[Kategorie:Konverter]] |
Aktuelle Version vom 2. April 2015, 15:54 Uhr
GDAL (ausgesprochen "Gudel") ist eine Rasterformate-Bibliothek (C++ Open Source von Frank Warmerdam) die typischerweise über die Kommandozeile gesteuert werden.
Siehe auch:
Alternative Rasterdaten-Konverter:
- TatukGIS Viewer (free, Windows)
- ECW Header Editor, ERMapper (free, Windows)
Inhaltsverzeichnis
Dokumentation
Weblinks:
Formate
Often used formats:
- GeoTIFF
- HGT
- (VRT - s special GDAL file for input which points to the 'real' files)
- (JPG/JPEG is a lossy file format suited for images but not for grid files like DTMs. Note that JPEG is also a compression option inside TIFF!)
Hier ein Auszug aus den verfügbaren Rasterformate ('ro' is read-only driver; 'rw' is read or write (ie. supports CreateCopy); 'rw+' is read, write and update (ie. supports Create)):
- BMP (rw+): MS Windows Device Independent Bitmap
- GIF (rw): Graphics Interchange Format (.gif)
- GMT (rw): GMT NetCDF Grid Format
- GTiff (rw+): GeoTIFF
- HFA (rw+): Erdas Imagine Images (.img)
- ILWIS (rw+): ILWIS Raster Map
- INGR (rw+): Intergraph Raster
- JP2ECW (rw+): ERMapper JPEG2000
- JP2MrSID (ro): MrSID JPEG2000
- JPEG (rw): JPEG JFIF
- MrSID (ro): Multi-resolution Seamless Image Database (MrSID)
- PNG (rw): Portable Network Graphics
- PNM (rw+): Portable Pixmap Format (netpbm)
- RMF (rw+): Raster Matrix Format
- SDTS (ro): SDTS Raster
- SRTMHGT (rw): SRTMHGT File Format
- USGSDEM (rw): USGS Optional ASCII DEM (and CDED)
- VRT (rw+): Virtual Raster
- WCS (ro): OGC Web Coverage Service
- WMS (ro): OGC Web Map Service
GDAL How To
gdal_translate for format conversion
gdal_translate -of XYZ elevation.tif elevation.xyz
gdal_merge for merging maps
gdal_merge -o eins.tif -co TILED=YES -co COMPRESS=LZW --optfile _filelist.txt -n 0 -init 255
Note the use of -n 0 when merging to treat areas of zero value as nodata. The gdalwarp commands are used in this case to transform to WGS84 so the images will be in a common coordinate system.
gdal_warp for coordinate transformation
gdalwarp img1.img img1_wgs84.img -t_srs WGS84 gdalwarp img2.img img2_wgs84.img -t_srs WGS84 gdal_merge.py img1_wgs84.img img2_wgs84.img -o mosaic.tif -n 0
gdaladdo for generating tile pyramids
gdaladdo -r gauss C:\SG.tif 2 4 8 16 32 64 128 256
GeoTiff Compression for Dummies
Blog post: http://blog.cleverelephant.ca/2015/02/geotiff-compression-for-dummies.html