Opened 10 years ago

Closed 5 years ago

#5322 closed enhancement (wontfix)

Support for Whitebox GAT raster format

Reported by: jlindsay Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: GAT
Cc:

Description (last modified by warmerdam)

I would like to request the addition of support for reading and writing the Whitebox Geospatial Analysis Tools raster format. These data are stored using two files, a text (ASCII) header file with a .dep extension, and a similarly named binary data file with a .tas extension. An example of the header file is as follows:

Min:	17.0
Max:	503.0
North:	43.69812
South:	43.104858
East:	-79.749756
West:	-80.562744
Cols:	2927
Rows:	2136
Data Type:	FLOAT
Z Units:	not specified
XY Units:	not specified
Projection:	not specified
Data Scale:	continuous
Display Min:	17.0
Display Max:	503.0
Preferred Palette:	grey.pal
NoData:	-32768.0
Byte Order:	LITTLE_ENDIAN
Metadata Entry:	Created by the Import GeoTIFF (.tif) tool.
Metadata Entry:	Created on Sat Dec 07 15;37;51 EST 2013

The Display Min and Display Max entries in the .dep header file are used for display purposes only. These values determine the default display minimum and maximum values and can be edited for more effectual visualization of raster data sets. There are four allowable Data Type entries including 'double', indicating a grid of 64-bit floating-point values, 'float', indicating 32-bit floating-point data, 'integer', indicating a file containing 16-bit signed integer data, and 'byte' indicating a 8-bit signed byte. The byte data format is rarely used. The Data Scale entry has four allowable entries including 'continuous', 'categorical', 'Boolean', and 'rgb'. This entry affects how the raster image will be displayed, in particular whether it is displayed using the default continuous palette and an applied linear stretch between the display minimum and maximum values, or whether it will be displayed using the default qualitative palette with no linear stretch. Entity-type data (e.g. soil categories) should always be displayed using a qualitative palette. Notice that the data scale in the header file will be automatically updated when the user checks or unchecks the Apply Linear Stretch option on the Layer Properties tab. The data scale for an image is originally set programmatically by the tool used to create the image. Raster images with a data scale of 'rgb' are not displayed with a palette but rather are displayed using the 32-bit red-green-blue colour model (aRGB). RGB colour images are usually created from multispectral imagery using the Create Colour Composite tool or by importing an image.

The header file may contain any number of metadata entries. Common entries include the function/tool that created the raster file as well as the date and time that the file was created. These entries are usually added by the program but can also be created by users. Notice that each metadata entry must be contained on a single line and that the character ':' will be changed to ';' when the file is written and read such that the colon can be preserved for delimiting the line header (e.g. Metadata entry:) from the line data. Thus in the above example, colons in the time entry have been converted to semi-colons. Also note that the coordinates stored in the header refer to the edges of the grid and not the pixel centres.

In the .tas binary file, the values are written as binary 64-bit or 32-bit floating-point numbers, 16-bit signed integer numbers, or 8-bit signed bytes depending on the Data Type. The first record of the file corresponds to the first row of the grid. Data are stored from left to right and top to bottom. The float data type version of a .tas file has the same structure as the ESRI (ArcGIS) floating-point binary raster file (Note: the equivalent header files are however different).

There are sample data files available from the samples directory within Whitebox. If you require any further sample files for development please let me know and I'd be happy to help (jlindsay(at)uoguelph.ca). I would also be happy to help with testing.

Attachments (3)

SampleData1.zip (285.1 KB ) - added by jlindsay 10 years ago.
SampleData2.zip (315.1 KB ) - added by jlindsay 10 years ago.
SampleData3.zip (713.9 KB ) - added by jlindsay 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by warmerdam, 10 years ago

Component: defaultGDAL_Raster
Description: modified (diff)
Keywords: GAT added
Status: newassigned

comment:2 by warmerdam, 10 years ago

John,

Could you provide a few varied sample files, hopefully as small as possible, that we could add to the test suite and use during development?

by jlindsay, 10 years ago

Attachment: SampleData1.zip added

by jlindsay, 10 years ago

Attachment: SampleData2.zip added

by jlindsay, 10 years ago

Attachment: SampleData3.zip added

comment:3 by Even Rouault, 9 years ago

Has there been progress on that ?

comment:4 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: assignedclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.