TKIMGGDAL

Introduction

Limitations

Extras

Requirements

Building

Download

This is a Tk photo image format handler using the Geospatial Data Abstraction Library (GDAL). GDAL is a translator library for raster geospatial data formats released by the Open Source Geospatial Foundation (see http://www.gdal.org/). This format handler has been developed because:

  • The GDAL library provides access to the standard types of images (ie PNG, TIFF, GIF, JPG etc) as well as popular GIS formats such as ECW and MrSid for which no format handler currently exists.

  • The image handlers built into Tk and the Img extension try to load the entire image into memory even if only a small portion is requested. The GDAL library can efficiently read subsections of very large images, even if the total image exceeds the system memory.

The package also adds a few useful standalone Tcl commands to get the properties of an image without loading it into memory.

The package contains the source files and compiled binary extensions for Windows and Linux i686. The binary extensions can be used from Tcl/Tk as follows:

package require tkimggdal

image create photo -format gdal

or

set theImage [image create photo]

$theImage read -format gdal -file very_big_image.tif -from 4000 5000 5000 6000



Note that the "-format gdal" option is not required if tkimggdal is the only handler loaded.

Performance can be improved by increasing the size of the cache GDAL uses. See the gdalcache command below.

This software is distributed under the "X11/MIT" license.

Copyright (c) 2006, Wayne Mogg



    SourceForge.net Logo