Top Banner
Geospatial Data Abstraction Library(GDAL) Sabya Sachi
31

Geospatial Data Abstraction Library(GDAL)-Utilities

Apr 01, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Geospatial Data Abstraction Library(GDAL)-Utilities

Geospatial Data Abstraction Library(GDAL)

Sabya Sachi

Page 2: Geospatial Data Abstraction Library(GDAL)-Utilities

Agenda

•Geospatial data•Introduction to GDAL•GDAL command line utilities

Page 3: Geospatial Data Abstraction Library(GDAL)-Utilities

What is geospatial data?

•Data or information identifying the geographic location of features and boundaries on Earth

•Accessed, manipulated and analysed by Geographic Information System

•Two types: ▫Raster and Vector

Page 4: Geospatial Data Abstraction Library(GDAL)-Utilities

•Raster data▫Contains rows and columns of data

cells(pixels)▫Each pixel stores a single

value consisting of colour and some additional information

▫Stored in various formats- from tif and jpeg to BLOB as in RDBMS

Page 5: Geospatial Data Abstraction Library(GDAL)-Utilities

•Vector data▫Geographical features expressed as vectors▫Coordinates, points, lines, arcs and

polygons▫Geometries linked to database describing

the attributes▫Can be made to respect spatial attributes

Page 6: Geospatial Data Abstraction Library(GDAL)-Utilities

Introduction to GDAL

A open source library for reading and writing raster geospatial data formats

Includes OGR library in its source tree which supports vector formats

Has various command line utilities for data translation and processing

Supports over 50 Raster formats Primarily developed by Frank Warmerdam

until version 1.3.2 when maintainership was transferred to GDAL/OGR Project management committee under Open Source geo spatial foundation

Page 7: Geospatial Data Abstraction Library(GDAL)-Utilities

•Crossplatform- supported on Linux, Windows, Mac

•Supports various softwares to read and write multiple data formats▫Google Earth▫Delta GIS▫GRASS GIS▫Orfeo Toolbox▫……….

•Has all command line utilities compiled by Frank Warmerdam into a single software FWTools

Page 8: Geospatial Data Abstraction Library(GDAL)-Utilities

GDAL Utility programs

22 utilities gdalinfo: report information about a file gdal_translate: Copy a raster file with control

of output format gdaladdo: Add overview to a file gdalwarp: Warp an image into new coordinate

system gdaltindex: Build a mapserver raster tile index gdalbuildvrt: Build a VRT from a list of

datasets

Page 9: Geospatial Data Abstraction Library(GDAL)-Utilities

gdal_countours: Countours from DEM gdaldem: Tools to analyze and visualize

DEMs rgbgdal_merge.py: Build a quick mosaic

from a set of images 2pct.py: Convert a 24 bit RGB to 8 bit

paletted. pct2rgb.py: Convert a 8 bit paletted to 24

bit RGB gdal2tiles.py: Create a TML tile

structure,KML and simple web viewer gdal_rasterize: Converts simple vector to

raster

Page 10: Geospatial Data Abstraction Library(GDAL)-Utilities

gdaltransform: Transform coordinates nearblack: Convert nearly black/white

border to exact value gdal_retile.py: Retiles a set of tiles or

build tiled pyramid levels gdal_grid: Create raster from scatter data gdal_proximity.py: Compute a raster

proximity map gdal_polygonize.py: Generate polygons

from raster gdal_sieve.py: Raster sieve filter gdal_fillnodata.py: Interpolate in non data

regions gdal-config:Get options required to build

software using GDAL

Page 11: Geospatial Data Abstraction Library(GDAL)-Utilities

gdalinfo

•Lists various information about GDAL supported dataset

•Eg. Format driver, raster size, coordinate system, band data types, band min/max values, descriptions, nodata value etc…

•Syntax:

Page 12: Geospatial Data Abstraction Library(GDAL)-Utilities

•An example output

Page 13: Geospatial Data Abstraction Library(GDAL)-Utilities

gdal_translate• Converts data from one format into another• Can also perform rescaling and resampling• Syntax:

Page 14: Geospatial Data Abstraction Library(GDAL)-Utilities

gdaladdo

•Build or rebuild overview images for most of the raster data formats

•Supports multiple resampling algorithms including nearest resampling cubic resampling etc.

•Syntax:

Page 15: Geospatial Data Abstraction Library(GDAL)-Utilities

gdalwarp

•A utility for image mosaicing, reprojection and warping

•Mosiacing: Correcting geometric deformations

•Warping: Mapping a point to another in an mage without changing the data value at that point, results in distortion sometimes, aids in mosaicing.

Page 16: Geospatial Data Abstraction Library(GDAL)-Utilities

•Syntax:

•Supports image mosaicing only if there is existing output image

•Doesn’t adjust existing output image spatial extent

Page 17: Geospatial Data Abstraction Library(GDAL)-Utilities

gdaltindex

•Builds a shapefile with a record for each input raster file

•Shapefile: Contain nontopological geometry and attribute information for the spatial features in a data set.

•If a shapefile already exists, new data is appended to it.

•Used with mapserver

Page 18: Geospatial Data Abstraction Library(GDAL)-Utilities

•Syntax:

Page 19: Geospatial Data Abstraction Library(GDAL)-Utilities

gdaldem

•Used for analyzing and visualizing DEMs- Digital Elevation models

•Has seven modes of operation:▫Hillshade▫Slope▫Aspect▫Color relief▫TRI(Terrain Ruggedness Index)▫TPI(Topographic Position Index)▫Roughness

Page 20: Geospatial Data Abstraction Library(GDAL)-Utilities

•Example: Original

dem image

100% 255 255 255 75%   235 220 175 50%   190 185 135 25%   240 250 150 0%    50  180  50

Page 21: Geospatial Data Abstraction Library(GDAL)-Utilities

gdaldem color-relief clip.tif ramp.txt colored.tif

Coloured relief raster

Page 22: Geospatial Data Abstraction Library(GDAL)-Utilities

gdaldem slope clip slope.tif -s 111120

Slope map

Page 23: Geospatial Data Abstraction Library(GDAL)-Utilities

gdaldem aspect clip.tif aspect.tif

Aspect map

Page 24: Geospatial Data Abstraction Library(GDAL)-Utilities

gdaldem hillshade clip.tif hillshade.tif -z 5 -s 111120

Hillshade- colour relief

Page 25: Geospatial Data Abstraction Library(GDAL)-Utilities

gdal_merge

•A python utility•Automatically mosaic a set of images into

a single one•Images must be in same coordinate

system •Images have must have matching raster

bands•Resolution can be different•Can overlap

Page 26: Geospatial Data Abstraction Library(GDAL)-Utilities

•Syntax:

Page 27: Geospatial Data Abstraction Library(GDAL)-Utilities

•Example :

Page 28: Geospatial Data Abstraction Library(GDAL)-Utilities

Conclusion

•GDAL is currently a major project in open source community and commercial GIS community

“I see GDAL as the glibc/glibc++ of the geospatial software world. It's open, it provides core functionality, I can't understand how anybody gets anything done without it.”

- Howard Butler

Page 29: Geospatial Data Abstraction Library(GDAL)-Utilities

References

•http://en.wikipedia.org/wiki/Geoinformation

•http://www.webopedia.com/TERM/S/spatial_data.html

•http://en.wikipedia.org/wiki/Geographic_information_system

•http://www.geom.unimelb.edu.au/gisweb/GISModule/GIST_Vector.htm

•http://www.geom.unimelb.edu.au/gisweb/GISModule/GIST_Raster.htm

Page 30: Geospatial Data Abstraction Library(GDAL)-Utilities

•http://www.gdal.org/gdal_utilities.html•http://en.wikipedia.org/wiki/GDAL•http://trac.osgeo.org/gdal/wiki/

UserDocs/RasterProcTutorial•http://www.gdal.org/ogr/

osr_tutorial.html•http://en.wikipedia.org/wiki/

Digital_elevation_model•http://research.dmsolutions.ca/?p=350

Page 31: Geospatial Data Abstraction Library(GDAL)-Utilities

THANK YOU