Using GDAL and OGR for data processing and analysis.pdf

(1038 KB) Pobierz
Using GDAL / OGR for Data Processing and
Analysis
Roger Andre
May 2009
790167436.007.png 790167436.008.png
What the heck is “GDAL”?
GDAL is an open source programming library
and set of utilities that allow you to manipulate
raster data.
As a library, GDAL presents a single abstract
data model to the calling application for all
supported formats.
OGR is the vector analog, also comes with
GDAL
Main focus is on conversions between formats,
but that's just the tip of the iceberg.
Works in Windows, Linux and MacOS
790167436.009.png 790167436.010.png
GDAL Trivia
History: Development started by Frank
Warmerdam in 1998. Now officially maintained by
OSGEO.
How do you pronounce “GDAL”?
"I pronounce it "goodle". I had originally thought to call it the "Geospatial
Object Oriented Data Abstraction Library" (GOODAL) to make the right
sound obvious, but I was too lazy to type GOODAL all the time, so I
dropped the OO part. Most folks pronounce the library "gee-dal" which is
ok too but not my preference." - Frank Wamerdam
790167436.001.png 790167436.002.png
gdal_translate -of
VRT (rw+): Virtual Raster
GTiff (rw+): GeoTIFF
NITF (rw+): National Imagery Transmission Format
HFA (rw+): Erdas Imagine Images (.img)
ELAS (rw+): ELAS
AAIGrid (rw): Arc/Info ASCII Grid
DTED (rw): DTED Elevation Raster
PNG (rw): Portable Network Graphics
JPEG (rw): JPEG JFIF
MEM (rw+): In Memory Raster
GIF (rw): Graphics Interchange Format (.gif)
XPM (rw): X11 PixMap Format
BMP (rw+): MS Windows Device Independent Bitmap
PCIDSK (rw+): PCIDSK Database File
PCRaster (rw): PCRaster Raster File
ILWIS (rw+): ILWIS Raster Map
SRTMHGT (rw): SRTMHGT File Format
Leveller (rw+): Leveller heightfield
Terragen (rw+): Terragen heightfield
GMT (rw): GMT NetCDF Grid Format
netCDF (rw): Network Common Data Format
PNM (rw+): Portable Pixmap Format (netpbm)
ENVI (rw+): ENVI .hdr Labelled
EHdr (rw+): ESRI .hdr Labelled
PAux (rw+): PCI .aux Labelled
MFF (rw+): Vexcel MFF Raster
MFF2 (rw+): Vexcel MFF2 (HKV) Raster
BT (rw+): VTP .bt (Binary Terrain) 1.3 Format
IDA (rw+): Image Data and Analysis
ERS (rw+): ERMapper .ers Labelled
JPEG2000 (rw): JPEG-2000 part 1 (ISO/IEC 15444-1)
FIT (rw): FIT Image
RMF (rw+): Raster Matrix Format
RST (rw+): Idrisi Raster A.1
INGR (rw+): Intergraph Raster
GSAG (rw): Golden Software ASCII Grid (.grd)
GSBG (rw+): Golden Software Binary Grid (.grd)
USGSDEM (rw): USGS Optional ASCII DEM (and
CDED)
ADRG (rw+): ARC Digitized Raster Graphics
$ gdal_translate -of <output_format> <infile> <outfile>
790167436.003.png 790167436.004.png
ogr2ogr -f
-> "ESRI Shapefile" (read/write)
-> "MapInfo File" (read/write)
-> "TIGER" (read/write)
-> "S57" (read/write)
-> "DGN" (read/write)
-> "Memory" (read/write)
-> "BNA" (read/write)
-> "CSV" (read/write)
-> "GML" (read/write)
-> "GPX" (read/write)
-> "KML" (read/write)
-> "GeoJSON" (read/write)
-> "Interlis 1" (read/write)
-> "Interlis 2" (read/write)
-> "GMT" (read/write)
-> "SQLite" (read/write)
-> "ODBC" (read/write)
-> "PostgreSQL" (read/write)
$ ogr2ogr -f <output_format> <output_file> <options> <input_file>
790167436.005.png 790167436.006.png
Zgłoś jeśli naruszono regulamin