What are Grid items?

Grid items look similar to Bitmap items. In Bitmap items each pixel stores a colour. But in Grid items each pixel, or cell, stores a numerical value. The cell values are mapped to colours on screen by using a Colour-set object.

Grid items could be used to store population densities or land-use. For population densities, the value of each Grid item pixel would be the number of people who live in the square that the pixel covers. For land-use, each pixel would store a code number for the usage of the land at that point, so 0 could be agricultural, 1 could be urban, and 2 could be unused, etc.

A common use of Grid items is to store the height above sea level of the ground. In this case the Grid item is often called a Digital Terrain Model, or DTM.

The pixels in a Grid item are actually 16-bit signed integers. However, each Grid item also stores a floating point Grid value resolution. This is applied to each pixel integer to yield the notional cell value. The choice of Grid value resolution is made automatically to maximise the accuracy of the Grid item.

Creating a Grid item using existing items

To create a Grid item select several items and then use Scatter Grid [Analysis-Grids]. The items which are used to create the Grid are often Point items. The simplest way to use Point items to make a Grid item is to count them. This will result in each Grid cell storing a count of the number of Point items that were in that cell.

See Scatter Grid [Analysis-Grids].

Create a Grid item from other Grid items

You can create a Grid item by combining other Grid items with an expression. First of all you need to save copies of the other Grid items in a Named Object Library. This allows you to then enter an expression that refers to those Grid items by name.

So if you have saved two Grid items as G1 and G2 you can then use these with the following expression:

FindGrid("G1")*FindGrid("G2")

See Grid From Expression [Analysis-Grids] for further explanation and examples.

Using Grid items

To examine the value of a Grid item you can choose the Grid item (e.g. DTM or DEM) option in the Status Bar. This option will give you the value of the Grid item cell under the cursor as you move the mouse.

You can use Create Shadow [Analysis-Grids] to create a monochrome bitmap indicating relief by shading. This is often used for Digital Terrain Models (DTM) to give a cartographic effect. The shadow is calculated by examining the difference in value between adjacent Grid item cells. This corresponds to the gradient of the ground at each point. This is not quite the same as true shadow casting, because that would require using a slower ray-tracing algorithm.

You can use Range QZone [Analysis-Grids] to create a QZone item covering the Grid cells where the cell values are within a certain range. So if the Grid item corresponds to a DTM then you could create a QZone of all places between 1000m and 3000m above sea level.


Send comments on this topic.

Click to return to www.cadcorp.com

© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).