356
GDAL/OGR user docs GDAL Utilities .............................................................................................................................................................1 Creating New Files.........................................................................................................................................1 General Command Line Switches..................................................................................................................2 gdalinfo .........................................................................................................................................................................3 SYNOPSIS ......................................................................................................................................................3 DESCRIPTION..............................................................................................................................................3 EXAMPLE ......................................................................................................................................................4 gdal_translate ..............................................................................................................................................................5 SYNOPSIS ......................................................................................................................................................5 DESCRIPTION..............................................................................................................................................5 EXAMPLE ......................................................................................................................................................6 gdaladdo .......................................................................................................................................................................7 SYNOPSIS ......................................................................................................................................................7 DESCRIPTION..............................................................................................................................................7 External overviews in GeoTIFF format ..........................................................................................................8 EXAMPLE ......................................................................................................................................................8 gdalwarp......................................................................................................................................................................9 SYNOPSIS ......................................................................................................................................................9 DESCRIPTION..............................................................................................................................................9 EXAMPLE ....................................................................................................................................................11 gdaltindex ...................................................................................................................................................................12 SYNOPSIS ....................................................................................................................................................12 DESCRIPTION............................................................................................................................................12 EXAMPLE ....................................................................................................................................................12 gdalbuildvrt ...............................................................................................................................................................13 SYNOPSIS ....................................................................................................................................................13 DESCRIPTION............................................................................................................................................13 EXAMPLE ....................................................................................................................................................14 gdal_contour ..............................................................................................................................................................15 SYNOPSIS ....................................................................................................................................................15 DESCRIPTION............................................................................................................................................15 EXAMPLE ....................................................................................................................................................15 gdaldem ......................................................................................................................................................................16 SYNOPSIS ....................................................................................................................................................16 Modes ............................................................................................................................................................17 AUTHORS ....................................................................................................................................................20 See also .........................................................................................................................................................20 rgb2pct.py ..................................................................................................................................................................21 SYNOPSIS ....................................................................................................................................................21 DESCRIPTION............................................................................................................................................21 EXAMPLE ....................................................................................................................................................21 pct2rgb.py ..................................................................................................................................................................22 SYNOPSIS ....................................................................................................................................................22 DESCRIPTION............................................................................................................................................22 i

GDAL/OGR user docs

Embed Size (px)

Citation preview

  • GDAL/OGR user docsGDAL Utilities.............................................................................................................................................................1

    Creating New Files.........................................................................................................................................1 General Command Line Switches..................................................................................................................2

    gdalinfo.........................................................................................................................................................................3 SYNOPSIS......................................................................................................................................................3 DESCRIPTION..............................................................................................................................................3 EXAMPLE......................................................................................................................................................4

    gdal_translate..............................................................................................................................................................5 SYNOPSIS......................................................................................................................................................5 DESCRIPTION..............................................................................................................................................5 EXAMPLE......................................................................................................................................................6

    gdaladdo.......................................................................................................................................................................7 SYNOPSIS......................................................................................................................................................7 DESCRIPTION..............................................................................................................................................7 External overviews in GeoTIFF format..........................................................................................................8 EXAMPLE......................................................................................................................................................8

    gdalwarp......................................................................................................................................................................9 SYNOPSIS......................................................................................................................................................9 DESCRIPTION..............................................................................................................................................9 EXAMPLE....................................................................................................................................................11

    gdaltindex...................................................................................................................................................................12 SYNOPSIS....................................................................................................................................................12 DESCRIPTION............................................................................................................................................12 EXAMPLE....................................................................................................................................................12

    gdalbuildvrt...............................................................................................................................................................13 SYNOPSIS....................................................................................................................................................13 DESCRIPTION............................................................................................................................................13 EXAMPLE....................................................................................................................................................14

    gdal_contour..............................................................................................................................................................15 SYNOPSIS....................................................................................................................................................15 DESCRIPTION............................................................................................................................................15 EXAMPLE....................................................................................................................................................15

    gdaldem......................................................................................................................................................................16 SYNOPSIS....................................................................................................................................................16 Modes............................................................................................................................................................17 AUTHORS....................................................................................................................................................20 See also.........................................................................................................................................................20

    rgb2pct.py..................................................................................................................................................................21 SYNOPSIS....................................................................................................................................................21 DESCRIPTION............................................................................................................................................21 EXAMPLE....................................................................................................................................................21

    pct2rgb.py..................................................................................................................................................................22 SYNOPSIS....................................................................................................................................................22 DESCRIPTION............................................................................................................................................22

    i

  • GDAL/OGR user docsgdal_merge.py...........................................................................................................................................................23

    SYNOPSIS....................................................................................................................................................23 DESCRIPTION............................................................................................................................................23 EXAMPLE....................................................................................................................................................24

    gdal2tiles.py...............................................................................................................................................................25 SYNOPSIS....................................................................................................................................................25 DESCRIPTION............................................................................................................................................25

    gdal_rasterize............................................................................................................................................................26 SYNOPSIS....................................................................................................................................................26 DESCRIPTION............................................................................................................................................26 EXAMPLE....................................................................................................................................................27

    gdaltransform............................................................................................................................................................28 SYNOPSIS....................................................................................................................................................28 DESCRIPTION............................................................................................................................................28 Reprojection Example...................................................................................................................................29 Image RPC Example.....................................................................................................................................29

    nearblack...................................................................................................................................................................30 SYNOPSIS....................................................................................................................................................30 DESCRIPTION............................................................................................................................................30

    gdal_retile.py.............................................................................................................................................................32

    gdal_grid....................................................................................................................................................................34 SYNOPSIS....................................................................................................................................................34 DESCRIPTION............................................................................................................................................34 INTERPOLATION ALGORITHMS............................................................................................................35 DATA METRICS.........................................................................................................................................36 READING COMMA SEPARATED VALUES...........................................................................................37 EXAMPLE....................................................................................................................................................38

    gdal_proximity.py.....................................................................................................................................................39 SYNOPSIS....................................................................................................................................................39 DESCRIPTION............................................................................................................................................39

    gdal_polygonize.py....................................................................................................................................................40 SYNOPSIS....................................................................................................................................................40 DESCRIPTION............................................................................................................................................40

    gdal_sieve.py..............................................................................................................................................................41 SYNOPSIS....................................................................................................................................................41 DESCRIPTION............................................................................................................................................41

    gdal_fillnodata.py......................................................................................................................................................42 SYNOPSIS....................................................................................................................................................42 DESCRIPTION............................................................................................................................................42

    gdallocationinfo.........................................................................................................................................................43 SYNOPSIS....................................................................................................................................................43 DESCRIPTION............................................................................................................................................43 EXAMPLE....................................................................................................................................................44

    ii

  • GDAL/OGR user docsgdal-config.................................................................................................................................................................45

    SYNOPSIS....................................................................................................................................................45 DESCRIPTION............................................................................................................................................45

    GDAL Raster Formats.............................................................................................................................................46

    AIRSAR -- AIRSAR Polarimetric Format.............................................................................................................51

    BAG --- Bathymetry Attributed Grid.....................................................................................................................52See Also:........................................................................................................................................................52

    BLX -- Magellan BLX Topo File Format...............................................................................................................53Georeferencing...............................................................................................................................................53Creation Issues...............................................................................................................................................53

    BMP --- Microsoft Windows Device Independent Bitmap...................................................................................54Creation Options............................................................................................................................................54See Also:........................................................................................................................................................54

    COSAR -- TerraSAR-X Complex SAR Data Product..........................................................................................55

    DODS -- OPeNDAP Grid Client..............................................................................................................................56Dataset Naming..............................................................................................................................................56Specialized AIS/DAS Metadata.....................................................................................................................56

    DTED -- Military Elevation Data............................................................................................................................59Read Issues.....................................................................................................................................................59Creation Issues...............................................................................................................................................59See Also:........................................................................................................................................................59

    ECW -- ERDAS Compress Wavelets (.ecw)...........................................................................................................60Creation Issues...............................................................................................................................................60 Configuration Options..................................................................................................................................61See Also:........................................................................................................................................................61

    ELAS - Earth Resources Laboratory Applications Software...............................................................................62

    Epsilon - Wavelet compressed images.....................................................................................................................63Creation options.............................................................................................................................................63

    ERS -- ERMapper .ERS...........................................................................................................................................64See Also:........................................................................................................................................................64

    FAST -- EOSAT FAST Format...............................................................................................................................65Data................................................................................................................................................................65Georeference..................................................................................................................................................67Metadata.........................................................................................................................................................67See Also:........................................................................................................................................................67

    Oracle Spatial GeoRaster.........................................................................................................................................68Browsing the database for GeoRasters..........................................................................................................68

    iii

  • GDAL/OGR user docsGIF -- Graphics Interchange Format.....................................................................................................................72

    Creation Issues...............................................................................................................................................72

    GRASS -- GRASS Rasters.......................................................................................................................................73NOTES on driver variations..........................................................................................................................73

    GRIB -- WMO General Regularly-distributed Information in Binary form.....................................................74Known issues:................................................................................................................................................74See Also:........................................................................................................................................................74

    GTiff -- GeoTIFF File Format.................................................................................................................................75Georeferencing...............................................................................................................................................75Internal nodata masks....................................................................................................................................75.......................................................................................................................................................................76Metadata.........................................................................................................................................................76Nodata value..................................................................................................................................................76Creation Issues...............................................................................................................................................77

    HDF4 --- Hierarchical Data Format Release 4 (HDF4).........................................................................................80Multiple Image Handling (Subdatasets)........................................................................................................80Georeference..................................................................................................................................................82Creation Issues...............................................................................................................................................82Metadata.........................................................................................................................................................82Driver building...............................................................................................................................................82See Also:........................................................................................................................................................83

    HDF5 --- Hierarchical Data Format Release 5 (HDF5).........................................................................................84Multiple Image Handling (Subdatasets)........................................................................................................84Georeference..................................................................................................................................................87Metadata.........................................................................................................................................................87Driver building...............................................................................................................................................87See Also:........................................................................................................................................................87

    HF2 -- HF2/HFZ heightfield raster.........................................................................................................................89Creation options.............................................................................................................................................89See also..........................................................................................................................................................89

    HFA -- Erdas Imagine .img......................................................................................................................................90Creation Issues...............................................................................................................................................90

    RST --- Idrisi Raster Format...................................................................................................................................91See Also:........................................................................................................................................................91

    INGR --- Intergraph Raster Format.......................................................................................................................92 Reading INGR Files......................................................................................................................................92Writing INGR Files.......................................................................................................................................92File Extension................................................................................................................................................92Georeference..................................................................................................................................................93See Also:........................................................................................................................................................93

    ISIS2 -- USGS Astrogeology ISIS Cube (Version 2)..............................................................................................94Creation Issues...............................................................................................................................................94See Also:........................................................................................................................................................94

    iv

  • GDAL/OGR user docsISIS3 -- USGS Astrogeology ISIS Cube (Version 3)..............................................................................................95

    See Also:........................................................................................................................................................95

    JP2ECW -- ERDAS JPEG2000 (.jp2).....................................................................................................................96Creation Issues...............................................................................................................................................96 Configuration Options..................................................................................................................................97See Also.........................................................................................................................................................97

    JP2KAK -- JPEG-2000 (based on Kakadu)...........................................................................................................98Creation Issues...............................................................................................................................................98

    JP2MrSID --- JPEG2000 via MrSID SDK...........................................................................................................100Creation Options..........................................................................................................................................100See Also:......................................................................................................................................................100

    JP2OpenJPEG --- JPEG2000 driver based on OpenJPEG library...................................................................101Creation Options..........................................................................................................................................101Patches for OpenJPEG library :...................................................................................................................101See Also:......................................................................................................................................................101

    JPEG2000 --- Implementation of the JPEG-2000 part 1....................................................................................103Creation Options..........................................................................................................................................103See Also:......................................................................................................................................................104

    JPEG -- JPEG JFIF File Format...........................................................................................................................105Creation Options..........................................................................................................................................105

    JPEGLS...................................................................................................................................................................106Creation Options..........................................................................................................................................106See Also:......................................................................................................................................................106

    JPIPKAK - JPIP Streaming..................................................................................................................................107JPIPKAK - JPIP Overview..........................................................................................................................107JPIPKAK -approach.....................................................................................................................................107JPIPKAK - implementation.........................................................................................................................107JPIPKAK - installation requirements...........................................................................................................110NOTES.........................................................................................................................................................110

    L1B -- NOAA Polar Orbiter Level 1b Data Set (AVHRR).................................................................................111Georeference................................................................................................................................................111Data..............................................................................................................................................................111Metadata.......................................................................................................................................................111See Also:......................................................................................................................................................111

    GDAL Driver for FARSITE v.4 LCP Format.....................................................................................................113Dataset..........................................................................................................................................................113

    Leveller --- Daylon Leveller Heightfield...............................................................................................................116Reading........................................................................................................................................................116Writing.........................................................................................................................................................116History.........................................................................................................................................................116See Also:......................................................................................................................................................116

    v

  • GDAL/OGR user docsMEM -- In Memory Raster....................................................................................................................................117

    Dataset Name Format..................................................................................................................................117Creation Options..........................................................................................................................................117

    MFF2 -- Vexcel MFF2 Image.................................................................................................................................118Format Details..............................................................................................................................................118

    MrSID --- Multi-resolution Seamless Image Database........................................................................................122Metadata.......................................................................................................................................................122Georeference................................................................................................................................................122Creation Options..........................................................................................................................................122See Also:......................................................................................................................................................123

    MrSID/MG4 LiDAR Compression / Point Cloud View files..............................................................................124Example View files (from View Document specification)..........................................................................124Writing not supported..................................................................................................................................125Limitations of current implementation........................................................................................................125See Also:......................................................................................................................................................125

    MSG -- Meteosat Second Generation....................................................................................................................126Build Instructions.........................................................................................................................................126Specification of Source Dataset...................................................................................................................126Georeference and Projection........................................................................................................................128

    MSGN -- Meteosat Second Generation (MSG) Native Archive Format (.nat).................................................129

    NetCDF: Network Common Data Form...............................................................................................................130 Multiple Image Handling (Subdatasets).....................................................................................................130Dimension....................................................................................................................................................132Georeference................................................................................................................................................132Creation Issues.............................................................................................................................................133GDAL NetCDF Metadata............................................................................................................................133Driver building.............................................................................................................................................134See Also:......................................................................................................................................................134

    NITF -- National Imagery Transmission Format................................................................................................135Creation Issues.............................................................................................................................................135Links............................................................................................................................................................136Credit...........................................................................................................................................................136

    OGDI -- OGDI Bridge............................................................................................................................................137

    OZI -- OZF2/OZFX3 raster...................................................................................................................................139See also........................................................................................................................................................139

    JAXA PALSAR Processed Products.....................................................................................................................140

    PCIDSK --- PCI Geomatics Database File...........................................................................................................141Creation Options..........................................................................................................................................141See Also:......................................................................................................................................................141

    Geospatial PDF........................................................................................................................................................142Restrictions..................................................................................................................................................142See also........................................................................................................................................................142

    vi

  • GDAL/OGR user docsPDS -- Planetary Data System...............................................................................................................................143

    See Also:......................................................................................................................................................143

    Rasdaman GDAL driver........................................................................................................................................144

    Rasterlite - Rasters in SQLite DB..........................................................................................................................145Connexion string syntax in read mode.........................................................................................................145Creation issues.............................................................................................................................................145Overviews....................................................................................................................................................146Examples:.....................................................................................................................................................146

    R -- R Object Data Store........................................................................................................................................148Creation Options..........................................................................................................................................148

    RIK -- Swedish Grid Maps.....................................................................................................................................149

    RMF --- Raster Matrix Format.............................................................................................................................150Metadata.......................................................................................................................................................150Creation Options..........................................................................................................................................150See Also:......................................................................................................................................................150

    RS2 -- RadarSat 2 XML Product..........................................................................................................................151Data Calibration...........................................................................................................................................151

    ESRI ArcSDE Raster..............................................................................................................................................152GDAL ArcSDE Raster driver features........................................................................................................152Performance considerations.........................................................................................................................152Dataset specification....................................................................................................................................152

    Terragen --- Terragen Terrain File...................................................................................................................154Reading........................................................................................................................................................154Writing.........................................................................................................................................................154Roundtripping..............................................................................................................................................154History.........................................................................................................................................................154See Also:......................................................................................................................................................154

    USGSDEM -- USGS ASCII DEM (and CDED)...................................................................................................155Creation Issues.............................................................................................................................................155

    GDAL Virtual Format Tutorial............................................................................................................................157 Introduction.................................................................................................................................................157 .vrt Format..................................................................................................................................................157 .vrt Descriptions for Raw Files...................................................................................................................161 Programatic Creation of VRT Datasets......................................................................................................162Using Derived Bands...................................................................................................................................164 Multi-threading issues.................................................................................................................................166

    Various Support GDAL Raster Formats..............................................................................................................167AAIGrid -- Arc/Info ASCII Grid.................................................................................................................167ACE2 -- ACE2.............................................................................................................................................167ADRG/ARC Digitized Raster Graphics (.gen/.thf).....................................................................................167AIG -- Arc/Info Binary Grid........................................................................................................................168BSB -- Maptech/NOAA BSB Nautical Chart Format.................................................................................168BT -- VTP .bt Binary Terrain Format..........................................................................................................168

    vii

  • GDAL/OGR user docsVarious Support GDAL Raster Formats

    CEOS -- CEOS Image.................................................................................................................................169CTG -- USGS LULC Composite Theme Grid............................................................................................169DIMAP -- Spot DIMAP...............................................................................................................................169DODS/OPeNDAP -- Read rasters from DODS/OPeNDAP servers............................................................170DOQ1 -- First Generation USGS DOQ.......................................................................................................170DOQ2 -- New Labelled USGS DOQ...........................................................................................................170E00GRID -- Arc/Info Export E00 GRID.....................................................................................................170EHdr -- ESRI .hdr Labelled.........................................................................................................................170ECRG Table Of Contents (TOC.xml).........................................................................................................171EIR -- Erdas Imagine Raw...........................................................................................................................171ENVI - ENVI .hdr Labelled Raster..............................................................................................................172Envisat -- Envisat Image Product................................................................................................................172FITS -- Flexible Image Transport System...................................................................................................172GenBin - Generic Binary (.hdr labelled)......................................................................................................173GRASSASCIIGrid -- GRASS ASCII Grid.................................................................................................173GSAG -- Golden Software ASCII Grid File Format...................................................................................173GSBG -- Golden Software Binary Grid File Format...................................................................................173 GS7BG -- Golden Software Surfer 7 Binary Grid File Format..................................................................174GXF -- Grid eXchange File.........................................................................................................................174IDA -- Image Display and Analysis.............................................................................................................174ILWIS -- Raster Map...................................................................................................................................174JDEM -- Japanese DEM (.mem)..................................................................................................................175LAN -- Erdas 7.x .LAN and .GIS................................................................................................................175MFF -- Vexcel MFF Raster.........................................................................................................................175NDF -- NLAPS Data Format.......................................................................................................................176GMT -- GMT Compatible netCDF..............................................................................................................176PAux -- PCI .aux Labelled Raw Format......................................................................................................176PCRaster raster file format...........................................................................................................................177PNG -- Portable Network Graphics.............................................................................................................177PNM -- Netpbm (.pgm, .ppm).....................................................................................................................178Raster Product Format/RPF (a.toc)..............................................................................................................178SAR_CEOS -- CEOS SAR Image...............................................................................................................179SDAT -- SAGA GIS Binary Grid File Format............................................................................................180SDTS -- USGS SDTS DEM........................................................................................................................180SGI - SGI Image Format..............................................................................................................................180SNODAS -- Snow Data Assimilation System.............................................................................................181Standard Product Format (ASRP/USRP) (.gen)..........................................................................................181SRTMHGT - SRTM HGT Format..............................................................................................................181WLD -- ESRI World File.............................................................................................................................181XPM - X11 Pixmap.....................................................................................................................................182GFF - Sandia National Laboratories GSAT File Format.............................................................................182ZMap -- ZMap Plus Grid.............................................................................................................................182

    WCS -- OGC Web Coverage Service....................................................................................................................184Time.............................................................................................................................................................184

    WEBP - WEBP........................................................................................................................................................186Creation options...........................................................................................................................................186

    WMS -- Web Map Services....................................................................................................................................187Minidrivers...................................................................................................................................................189Examples......................................................................................................................................................191Open syntax.................................................................................................................................................191

    viii

  • GDAL/OGR user docsWMS -- Web Map Services

    See Also:......................................................................................................................................................192

    XYZ -- ASCII Gridded XYZ.................................................................................................................................193Creation options...........................................................................................................................................193See also........................................................................................................................................................193

    OGR Utility Programs............................................................................................................................................194

    ogrinfo......................................................................................................................................................................195

    ogr2ogr.....................................................................................................................................................................198

    ogrtindex..................................................................................................................................................................201

    OGR Vector Formats.............................................................................................................................................202

    Aeronav FAA...........................................................................................................................................................204See Also.......................................................................................................................................................204

    ESRI ArcObjects.....................................................................................................................................................205Overview......................................................................................................................................................205Requirements...............................................................................................................................................205Usage............................................................................................................................................................205Building Notes.............................................................................................................................................206Known Issues...............................................................................................................................................206

    Arc/Info Binary Coverage......................................................................................................................................207See Also.......................................................................................................................................................207

    Arc/Info E00 (ASCII) Coverage............................................................................................................................208See Also.......................................................................................................................................................208

    BNA - Atlas BNA....................................................................................................................................................209Creation Issues.............................................................................................................................................209Example.......................................................................................................................................................210See Also.......................................................................................................................................................210

    CouchDB - CouchDB/GeoCouch...........................................................................................................................211CouchDB vs OGR concepts.........................................................................................................................211Dataset name syntax....................................................................................................................................211Authentication..............................................................................................................................................211Filtering........................................................................................................................................................211Paging..........................................................................................................................................................211Write support...............................................................................................................................................212Write support and OGR transactions...........................................................................................................212Layer creation options..................................................................................................................................212Examples......................................................................................................................................................212See Also.......................................................................................................................................................212

    Comma Separated Value (.csv)..............................................................................................................................213Format..........................................................................................................................................................213Reading CSV containing spatial information..............................................................................................214Creation Issues.............................................................................................................................................214

    ix

  • GDAL/OGR user docsComma Separated Value (.csv)

    Particular datasources..................................................................................................................................215Other Notes..................................................................................................................................................215

    Microstation DGN...................................................................................................................................................216Supported Elements.....................................................................................................................................216Styling Information......................................................................................................................................216Creation Issues.............................................................................................................................................216

    DODS/OPeNDAP....................................................................................................................................................218Caveats.........................................................................................................................................................218

    AutoCAD DXF........................................................................................................................................................219Supported Elements.....................................................................................................................................219DXF_INLINE_BLOCKS............................................................................................................................219Character Encodings....................................................................................................................................220Creation Issues.............................................................................................................................................220

    EDIGEO...................................................................................................................................................................222Labels...........................................................................................................................................................222

    ESRI File Geodatabase (FileGDB)........................................................................................................................223Requirements...............................................................................................................................................223Dataset Creation Options.............................................................................................................................223Layer Creation Options................................................................................................................................223Examples......................................................................................................................................................223Building Notes.............................................................................................................................................223Known Issues...............................................................................................................................................223Links............................................................................................................................................................224

    FMEObjects Gateway............................................................................................................................................225Caching........................................................................................................................................................225Caveats.........................................................................................................................................................225Build/Configuration.....................................................................................................................................225

    GeoConcept text export..........................................................................................................................................227GeoConcept Text File Format (gxt).............................................................................................................227Creation Issues.............................................................................................................................................227

    GeoJSON.................................................................................................................................................................231Datasource....................................................................................................................................................231Layer............................................................................................................................................................231Feature..........................................................................................................................................................231Geometry......................................................................................................................................................232Environment variables.................................................................................................................................232Layer creation option...................................................................................................................................232Example.......................................................................................................................................................232See Also.......................................................................................................................................................232

    Geomedia MDB database.......................................................................................................................................233How to use Geomedia driver with unixODBC and MDB Tools (on Unix and Linux)...............................233See also........................................................................................................................................................233

    x

  • GDAL/OGR user docsGeoRSS : Geographically Encoded Objects for RSS feeds.................................................................................234

    Encoding issues............................................................................................................................................234Field definitions...........................................................................................................................................235Creation Issues.............................................................................................................................................235Example.......................................................................................................................................................236See Also.......................................................................................................................................................237

    GFT - Google Fusion Tables..................................................................................................................................238Dataset name syntax....................................................................................................................................238Authentication..............................................................................................................................................238Geometry......................................................................................................................................................238Filtering........................................................................................................................................................239Paging..........................................................................................................................................................239Write support...............................................................................................................................................239Write support and OGR transactions...........................................................................................................239SQL..............................................................................................................................................................240Examples......................................................................................................................................................240See Also.......................................................................................................................................................240

    GML - Geography Markup Language.................................................................................................................241Parsers..........................................................................................................................................................241CRS support.................................................................................................................................................241Schema.........................................................................................................................................................241Geometry reading.........................................................................................................................................242gml:xlink resolving......................................................................................................................................242Encoding issues............................................................................................................................................243Feature id (fid / gml:id)................................................................................................................................243Performance issues with large multi-layer GML files.................................................................................243Creation Issues.............................................................................................................................................244Syntax of .gfs file by example.....................................................................................................................244Example.......................................................................................................................................................245See Also.......................................................................................................................................................246

    GMT ASCII Vectors (.gmt)...................................................................................................................................247Creation Issues.............................................................................................................................................247

    GPSBabel.................................................................................................................................................................248Read support................................................................................................................................................248Write support...............................................................................................................................................248

    GPX - GPS Exchange Format...............................................................................................................................250Encoding issues............................................................................................................................................250Extensions element reading.........................................................................................................................251Creation Issues.............................................................................................................................................251Issues when translating to Shapefile............................................................................................................252Example.......................................................................................................................................................253FAQ.............................................................................................................................................................254See Also.......................................................................................................................................................254

    GRASS.....................................................................................................................................................................255Datasource name..........................................................................................................................................255Layer names.................................................................................................................................................255Attribute filter..............................................................................................................................................255Spatial filter..................................................................................................................................................256

    xi

  • GDAL/OGR user docsGRASS

    GISBASE.....................................................................................................................................................256Missing topology.........................................................................................................................................256Random access.............................................................................................................................................256Known problem...........................................................................................................................................256See Also.......................................................................................................................................................256

    GTM - GPS TrackMaker.......................................................................................................................................257Example.......................................................................................................................................................257See Also.......................................................................................................................................................257

    HTF - Hydrographic Transfer Format.................................................................................................................258See Also.......................................................................................................................................................259

    IDB...........................................................................................................................................................................260Environment variables.................................................................................................................................260

    INTERLIS...............................................................................................................................................................261Model...........................................................................................................................................................261Other Notes..................................................................................................................................................262

    INGRES...................................................................................................................................................................263Caveats.........................................................................................................................................................263Creation Issues.............................................................................................................................................263

    KML - Keyhole Markup Language.......................................................................................................................265KML Reading..............................................................................................................................................265Example.......................................................................................................................................................266Caveats.........................................................................................................................................................266See Also.......................................................................................................................................................266

    LIBKML Driver (.kml .kmz).................................................................................................................................267Datasource....................................................................................................................................................267Layer............................................................................................................................................................267Feature..........................................................................................................................................................267Fields............................................................................................................................................................268Geometry......................................................................................................................................................268Example.......................................................................................................................................................269

    Access MDB databases...........................................................................................................................................271How to build the MDB driver (on Linux)....................................................................................................271How to run the MDB driver (on Linux).......................................................................................................271Resources.....................................................................................................................................................271See also........................................................................................................................................................271

    Memory....................................................................................................................................................................272Creation Issues.............................................................................................................................................272

    MapInfo TAB and MIF/MID.................................................................................................................................273Creation Issues.............................................................................................................................................273

    MSSQLSpatial - Microsoft SQL Server Spatial Database.................................................................................275Connecting to a database.............................................................................................................................275SQL statements............................................................................................................................................275

    xii

  • GDAL/OGR user docsMSSQLSpatial - Microsoft SQL Server Spatial Database

    Creation Issues.............................................................................................................................................275Examples......................................................................................................................................................276

    MySQL.....................................................................................................................................................................277Caveats.........................................................................................................................................................277Creation Issues.............................................................................................................................................277

    NAS - ALKIS...........................................................................................................................................................279See Also.......................................................................................................................................................279

    UK .NTF...................................................................................................................................................................280See Also.......................................................................................................................................................280Implementation Notes..................................................................................................................................280

    Oracle Spatial..........................................................................................................................................................283SQL Issues...................................................................................................................................................283Caveats.........................................................................................................................................................283Creation Issues.............................................................................................................................................283

    ODBC RDBMS........................................................................................................................................................286Creation Issues.............................................................................................................................................286

    OGDI Vectors..........................................................................................................................................................287Examples......................................................................................................................................................287

    OpenAir - OpenAir Special Use Airspace Format...............................................................................................289See Also.......................................................................................................................................................289

    PDS - Planetary Data Systems TABLE................................................................................................................290See Also.......................................................................................................................................................290

    PostgreSQL / PostGIS............................................................................................................................................291Connecting to a database.............................................................................................................................291Geometry columns.......................................................................................................................................291SQL statements............................................................................................................................................291Creation Issues.............................................................................................................................................291

    PostgreSQL SQL Dump.........................................................................................................................................295Creation options...........................................................................................................................................295

    ESRI Personal GeoDatabase..................................................................................................................................297How to use PGeo driver with unixODBC and MDB Tools (on Unix and Linux).......................................297Resources.....................................................................................................................................................299See also........................................................................................................................................................299

    IHO S-57 (ENC)......................................................................................................................................................300Feature Translation......................................................................................................................................300

    ESRI ArcSDE..........................................................................................................................................................303Layer Creation Options................................................................................................................................303

    xiii

  • GDAL/OGR user docsSDTS.........................................................................................................................................................................305

    See Also.......................................................................................................................................................305

    ESRI Shapefile........................................................................................................................................................306Spatial and Attribute Indexing.....................................................................................................................306Creation Issues.............................................................................................................................................307Spatial extent................................................................................................................................................308Size Issues....................................................................................................................................................308

    SQLite RDBMS.......................................................................................................................................................309Using the SpatiaLite library (Spatial extension for SQLite)........................................................................309Creation Issues.............................................................................................................................................310Other Notes..................................................................................................................................................310

    SUA - Tim Newport-Peac