| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| geoscene3d:concepts:grid_cell_origin [2026/01/07 13:58] – dev | geoscene3d:concepts:grid_cell_origin [2026/01/12 08:29] (current) – dev |
|---|
| ====== Grid Cell Origin ====== | ====== Grid Cell Origin ====== |
| |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>**What is a 2D Grid?**</font> | comming soon... |
| | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>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.</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>A crucial aspect of a grid definition is **how the position of each cell is referenced**.</font> | |
| | |
| ---- | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>**Grid Cells vs. Grid Points**</font> | |
| | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>A common source of confusion is the distinction between:</font> | |
| | |
| * <font 12pt/Aptos,sans-serif;;inherit;;inherit>**Grid cells** (areas)</font> | |
| | |
| * <font 12pt/Aptos,sans-serif;;inherit;;inherit>**Grid points** (coordinates)</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>In GeoScene3D, grid-based data are internally defined using **grid points**, not full polygons.</font> | |
| | |
| ---- | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>**Grid Origin in GeoScene3D**</font> | |
| | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>GeoScene3D defines the **grid origin (null point)** at the **lower-left corner of the grid**.</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>This means:</font> | |
| | |
| * <font 12pt/Aptos,sans-serif;;inherit;;inherit>The grid coordinates start in the lower-left corner</font> | |
| | |
| * <font 12pt/Aptos,sans-serif;;inherit;;inherit>Cell spacing is applied in positive x- and y-directions from this point</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>This definition is consistent with many numerical and interpolation-based grid formats.</font> | |
| | |
| ---- | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>**Cell Reference Point: Center of the Cell**</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>Although the grid origin is located at the lower-left corner, **GeoScene3D defines grid values at the center of each cell**.</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>In practice, this means:</font> | |
| | |
| * <font 12pt/Aptos,sans-serif;;inherit;;inherit>The first grid value is located **half a cell size** away from the lower-left corner</font> | |
| | |
| * <font 12pt/Aptos,sans-serif;;inherit;;inherit>Each grid point represents the center of a grid cell, not its corner</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>This is the key point that often causes confusion.</font> | |
| | |
| ---- | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>**Effect on Visualization**</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>Because grid values are defined at cell centers, the visualization behaves as follows:</font> | |
| | |
| * <font 12pt/Aptos,sans-serif;;inherit;;inherit>The first cell is centered around its grid point</font> | |
| | |
| * <font 12pt/Aptos,sans-serif;;inherit;;inherit>At the grid boundary, only **half of the first cell lies inside the grid extent**</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>As a result:</font> | |
| | |
| * <font 12pt/Aptos,sans-serif;;inherit;;inherit>The first grid cell appears visually as a **quarter cell** in the lower-left corner</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>This is **not an error**, but a direct consequence of:</font> | |
| | |
| - <font 12pt/Aptos,sans-serif;;inherit;;inherit>the grid origin being defined at the corner, and</font> | |
| - <font 12pt/Aptos,sans-serif;;inherit;;inherit>the grid values being defined at cell centers.</font> | |
| | |
| ---- | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>**Illustration**</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>The figure below illustrates this behavior:</font> | |
| {{:cetrum_vs_lower_left_corner1_1.png?600|}} | |
| | |
| * <font 12pt/Aptos,sans-serif;;inherit;;inherit>Grid points are located at the **centers of the cells**</font> | |
| | |
| * <font 12pt/Aptos,sans-serif;;inherit;;inherit>The grid origin is at the **lower-left corner**</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>The first visible cell is therefore only partially shown</font> | |
| <font 12pt/Aptos,sans-serif;;inherit;;inherit>This visual effect helps explain why the grid may appear “cut” at the edges.</font> | |
| |
| |