Package org.geotools.gce.grassraster

GRASS input/output drivers

See: Description

Package org.geotools.gce.grassraster Description

GRASS input/output drivers

In this package the I/O drivers for reading and writing GRASS raster maps are placed.

To better understand the code a good overview should be taken on the GRASS database-Location-Mapset structure, of which a short introduction is given below.

File structure of GRASS Location

A GRASS raster map consists of several files in several subdirectories in a mapset, organized as follows: Most important files and folders for now:

The cell header file

A typical grass map header looks like the following:
proj: 1
zone: 13
north: 4928000
south: 4914000
east: 609000
west: 590000
cols: 950
rows: 700
e-w resol: 20
n-s resol: 20
format: 0
compressed: 1


Reclassified files

If the first line reports 'reclass' then this file is a reclassified file and the original data file is given by the following two lines:
reclass
name: soils
mapset: PERMANENT
#1 5 3 8 .... ....

The color table file

Colortables for GRASS 5 and greater are supported.

The format of the color file, which is located in location/mapset/colr/mapname is the following:

The first line is a % character and two numbers indicating the minimum and maximum data values which have colors. Note that in JGrass after the range values we add a third value for alpha support.

After the first line, the list of color rules appears, that can be of the following formats:

Copyright © 1996-2014 Geotools. All Rights Reserved.