This is an old revision of the document!
Grid Cell Origin
What is a 2D Grid?
A 2D grid is a regular spatial discretization of an area into equally sized cells.
Each cell represents a spatial unit for which values (e.g. elevation, thickness, parameters) are defined.
A crucial aspect of a grid definition is how the position of each cell is referenced.
Grid Cells vs. Grid Points A common source of confusion is the distinction between:
- Grid cells (areas)
- Grid points (coordinates)
In GeoScene3D, grid-based data are internally defined using grid points, not full polygons.
Grid Origin in GeoScene3D GeoScene3D defines the grid origin (null point) at the lower-left corner of the grid. This means:
- The grid coordinates start in the lower-left corner
- Cell spacing is applied in positive x- and y-directions from this point
This definition is consistent with many numerical and interpolation-based grid formats.
Cell Reference Point: Center of the Cell Although the grid origin is located at the lower-left corner, GeoScene3D defines grid values at the center of each cell. In practice, this means:
- The first grid value is located half a cell size away from the lower-left corner
- Each grid point represents the center of a grid cell, not its corner
This is the key point that often causes confusion.
Effect on Visualization Because grid values are defined at cell centers, the visualization behaves as follows:
- The first cell is centered around its grid point
- At the grid boundary, only half of the first cell lies inside the grid extent
As a result:
- The first grid cell appears visually as a quarter cell in the lower-left corner
This is not an error, but a direct consequence of:
- the grid origin being defined at the corner, and
- the grid values being defined at cell centers.
Illustration
The figure below illustrates this behavior:
- Grid points are located at the centers of the cells
- The grid origin is at the lower-left corner
The first visible cell is therefore only partially shown This visual effect helps explain why the grid may appear “cut” at the edges.
