...
Code Block | ||
---|---|---|
| ||
{anchor:example file} POINT X Y Z TEMPERATURE PRESSURE 0 3.4 234.3 45.12 0.43 45.6 1 5.6 290.5 55.63 0.44 45.5 2 6.67 300.3 78.00 0.45 45.3 ... ... |
...
Polydata
A dataset of type polydata may contain any cell type except 3D cells. Triangles are often stitched together to form triangle strips that are suitable for displaying irregular surfaces. In practice, most polydatasets in Geocap contain only one cell type.
Two commonly used polydata types: triangle surface and irregular points
Polydata has a so-called explicit point representation. This means that each point's coordinate values are contained in the dataset. Since poly data points have no inherent structure and thus may appear anywhere in space, we need to store their actual coordinate values in order to infer their position. A common way of representing data is column format. The X, Y, Z coordinates are displayed in separate columns along with any additional data like in the #example file.
Grid
A grid is a regular lattice of points aligned with the coordinate axes. In Geocap this type of grid is also referred to as structured points, while other sources use the term uniform grid.
The size of a grid is determined by its dimensions and increments. The dimensions are the number of grid cells in each direction. The cell count in the X- and Y-direction are called rows and columns, respectively. The increment is the spacing between each grid cell. The increments are uniform along a given axis, although the X- and Y-axes may have different increments.
A simple illustration of a grid
Grids use an implicit point representation. This means that the point coordinates in 2D/3D space are not stored directly in the dataset. Rather, the position is calculated by multiplying the cell index with the grid increment.
The following listing of a digital elevation model (DEM) shows how the z-values (height) are positioned in separate grid cells, each with separate row/column values. Row and column positions are customarily denoted with a (i, j) index.
Code Block | ||
---|---|---|
| ||
POINT i j HEIGHT
0 0 0 34.3
1 1 0 34.4
2 2 0 34.5
3 0 1 34.2
4 1 1 34.3
5 2 1 34.6
...
...
|
With a grid increment of 4 meters point 5 would be in position (x, y) = (2*4, 4) = (8, 4). Note that the origo need not be in position (0, 0, 0).
There are two main grid forms of type structured points in Geocap:
- Surface grid. Also called 2d grid and is the form just described.
- Cube grid. Also called cube or 3d grid.
Images
Images are similar to grids. In fact, they share the same data structure. They differ, however, in that images are expected to show colors or gray-tones. Each grid cell therefore represents an image pixel, and gets its color from the associated attribute data. Color images would therefore contain three data attributes for each point, namely the red, green, and blue color components. Each value is in the 0-255 range. This is depicted in the following listing.
Code Block | ||
---|---|---|
| ||
POINT I J RED GREEN BLUE
0 0 0 120 210 77
1 1 0 73 56 27
2 2 0 15 110 99
3 0 1 84 57 51
4 1 1 51 72 11
5 2 1 67 11 87
...
...
|
An image consisting of a rectangular array of pixels is an example of raster graphics, as opposed to the vector graphics created by polydata.