Changes between Initial Version and Version 1 of UserDocs/RasterProcTutorial


Ignore:
Timestamp:
Sep 13, 2007, 11:21:08 AM (17 years ago)
Author:
warmerdam
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserDocs/RasterProcTutorial

    v1 v1  
     1= Raster Processing Tutorial =
     2
     3''This is a working copy of a tutorial to be presented at FOSS4G 2007 (L-01) that will hopefully also be useful as a web based tutorial in the future.''
     4
     5== Objectives ==
     6
     7A practical tutorial on processing and preparing raster data for visualization or futher analysis.  Exercises will include:
     8 
     9 * Exploring your image data
     10 * Format translation
     11 * Optimizing data for MapServer/MapGuide/etc
     12 * Rescaling
     13 * Mosaicing
     14 * Reprojection
     15 * Using virtual files.
     16
     17Most exercises will be performed using GDAL command line utility programs, with a final exercise demonstrating Python scripting for specialized processing.  It is intended that the workshop would be useful for anyone needing to prepare raster data for use in packages such as MapServer, MapGuide, QGIS, GRASS, OSSIM or proprietary GIS and imaging applications.
     18
     19Audience: Suitable for those new to GDAL.  Some familiarity with geospatial raster data and coordinate systems is assumed but not strictly required.
     20
     21System Requirements: FWTools for Windows or Linux
     22
     23Datasets: Download from http://download.osgeo.org/gdal/workshop
     24
     25''Note to self, need to add geogratis and/or geobase license info on download site for cded and CanMatrix data.''
     26
     27== Exploring Your Data ==
     28
     29{{{
     30- Use gdalinfo to review several datasets.
     31- Highlight:
     32   image size
     33   geotransform
     34   gcps
     35   coordinate system
     36   metadata
     37   band type
     38   block size
     39   nodata value
     40   color table
     41
     42- Use OpenEV to view datasets.
     43- Highlight:
     44   finding exact location of a pixel (and subpixel position issues)
     45   Seeing pixel greyscale values (and for multiple bands)
     46   "see through" due nodata and alpha bands.
     47   Overlay flipping
     48
     49Perhaps also demonstrate something similar with QGIS?
     50}}}
     51
     52== Simple Format Translation ==
     53
     54=== Know your Drivers ===
     55
     56The --formats commandline switch of gdal_translate can be used to see a list of available format drivers.  Each format reports if it is read only (ro), read/write (rw) or read/write/update (rw+).
     57
     58{{{
     59 gdal_translate --formats
     60}}}
     61
     62
     632b) The --format commandline switch can be used to query details about a
     64    particular driver, including creation options, and permitted data types.
     65
     66 gdalinfo --format jpeg
     67 gdal_translate --format png
     68
     69-- Translation --
     70
     712c) Translations are accomplished with the gdal_translate command.  The
     72    default output format is GeoTIFF:
     73
     74 gdal_translate east.dem eastdem.tif
     75
     762d) The -of flag is used to select an output format and the -co flag is
     77    used to specify a creation option:
     78
     79 gdal_translate -of JPEG -co QUALITY=40 world.png world.jpg
     80
     81-- Output Datatype --
     82
     832e) The -ot switch can be used to alter the output data type. 
     84
     85 gdal_translate -ot Byte east.dem bytedem.tif
     86
     872f) Use gdalinfo to verify data type, and OpenEV to observe that all
     88    elevations have been clipped to 255.
     89
     90-- Rescaling --
     91
     922g) The -scale switch can be used to rescale data. 
     93
     94    gdal_translate -of JPEG -scale east.dem east.jpg
     95
     962h) Explicit control of the input and output ranges is also available,
     97    and the gdalinfo -mm switch can be used to see pixel min/max values:
     98
     99    gdalinfo -mm east.dem
     100    gdal_translate -of JPEG -scale -100 678 0 255 east.dem east.jpg
     101