Skip to content

Commit bde018e

Browse files
committed
some of the fixes #2 #5
1 parent 16ffd18 commit bde018e

8 files changed

Lines changed: 58 additions & 52 deletions

File tree

‎website/docs/ecosystem/dggrid.md‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ A minimal metafile for generating IGEO7 cells looks like:
4141
```
4242
dggrid_operation GENERATE_GRID
4343
dggs_type IGEO7
44+
dggs_vert0_lon 11.20
4445
dggs_res_spec 9
4546
clip_subset_type WHOLE_EARTH
4647
cell_output_type GEOJSON
@@ -62,7 +63,7 @@ DGGRID supports two names for the same underlying grid:
6263
| `IGEO7` | Z7 / Z7_STRING | Recommended; uses Z7 indexing natively |
6364
| `ISEA7H` | SEQNUM, Q2DI, etc. | Same grid; older addressing schemes |
6465

65-
Always use `IGEO7` with `output_address_type="Z7_STRING"` for new work.
66+
Always use `IGEO7` with `output_address_type="Z7_STRING"` for new work (`HIERNDX` required from latest DGRID).
6667

6768
## ISEA Orientation
6869

@@ -74,7 +75,20 @@ dggs_vert0_lat 58.2825255885
7475
dggs_vert0_azimuth 0.0
7576
```
7677

77-
This is the default and does not need to be specified explicitly when using dggrid4py.
78+
This is the default, but `dggs_vert0_lon 11.20` needs to be specified explicitly when using dggrid4py:
79+
80+
```
81+
dggs_vert0_lon 11.20
82+
dggs_vert0_lat 58.2825255885
83+
dggs_vert0_azimuth 0.0
84+
```
85+
86+
87+
## TODO Authalic conversion
88+
89+
dggrid4py (and Julia DggridRunner) has functions to translate/convert between the default spherical coordinates of DGGRID and now widely adopted ellipsoidal DGGS coordinates.
90+
91+
DGGAL does that authomatically for its ISEA7H_Z7 grid adaptation of IGEO7.
7892

7993
## Further Reading
8094

‎website/docs/highlights/equal-area.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ With H3's gnomonic projection, cells near icosahedral face edges are up to **50%
2020

2121
| System | Projection | Cell area variation |
2222
|---|---|:---:|
23-
| **IGEO7** | ISEA (equal area) | **0%** |
23+
| **IGEO7** | ISEA (equal area) | **<0.1%** |
2424
| H3 | Gnomonic | up to ±50% |
25-
| S2 | Cube face projection | up to ±30% |
25+
| S2 | Cube face projection | up to ±50% |
2626

2727
These are not edge-case outliers. H3's ±50% variation is a systematic property of its projection — every cell near an icosahedral face edge is significantly smaller than a face-centre cell at the same resolution.
2828

‎website/docs/highlights/use-cases.md‎

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,6 @@ IGEO7 is particularly well suited to applications where **equal area matters** a
1212

1313
**Biodiversity and species distribution modelling** requires area-accurate grid cells so that species richness per unit area is comparable across regions. IGEO7's equal-area guarantee means a cell at resolution 9 in Estonia covers the same 1.264 km² as a cell in Brazil.
1414

15-
```python
16-
# Index species observations to IGEO7 resolution 9
17-
gdf_obs = dggrid.cells_for_geo_points(
18-
geodf_points_wgs84=observations,
19-
cell_ids_only=True,
20-
dggs_type="IGEO7",
21-
resolution=9,
22-
)
23-
# Count per cell — directly comparable across the globe
24-
counts = gdf_obs.groupby("name").size()
25-
```
26-
2715
**Land cover and habitat area** — aggregate raster data (Sentinel-2, Copernicus Land Cover) into IGEO7 cells for consistent area-weighted statistics. Resolution 14 (~9.8 m) matches Sentinel-2's 10 m native resolution.
2816

2917
## Earth Observation Data Cubes
@@ -43,31 +31,22 @@ The uniform cell size makes spatial aggregation and resampling mathematically co
4331

4432
## Hydrology and Water Resources
4533

46-
Stream networks and catchment delineation benefit from IGEO7's multi-resolution hierarchy. Resolutions 8–10 (~3–1.3 km) match typical hydrological modelling scales; resolution 12 (~68 m) suits fine-scale flow routing.
34+
Stream networks and catchment delineation benefit from IGEO7's multi-resolution hierarchy. Resolutions 8-10 (~3-1.3 km) match typical hydrological modelling scales; resolution 12 (~68 m) suits fine-scale flow routing.
4735

4836
Because cells are equal area, runoff volumes computed per cell are directly summable up the hierarchy without correction factors.
4937

38+
With the Z7 indexing, it is a very fast operation to query the neighbours, and the neighbours are alsway in a predictable order.
39+
5040
## Urban Analytics and Planning
5141

5242
Resolution 11 (~181 m) and 12 (~68 m) provide natural scales for neighbourhood-level urban analysis — matching typical census block sizes and street-grid granularity. The hexagonal topology (all 6 neighbours equidistant) avoids the directional bias of square grids.
5343

54-
```python
55-
# Generate IGEO7 grid over a city at 181m resolution
56-
city_bbox = shapely.geometry.box(24.5, 59.3, 25.2, 59.6) # Tallinn
57-
58-
grid = dggrid.grid_cell_polygons_for_extent(
59-
dggs_type="IGEO7",
60-
resolution=11,
61-
clip_geom=city_bbox,
62-
output_address_type="Z7_STRING",
63-
)
64-
```
6544

6645
## OGC API DGGS Services
6746

68-
**pydggsapi** implements the [OGC API – DGGS](https://ogcapi.ogc.org/dggs/) standard with IGEO7 as a supported reference system. This allows IGEO7-indexed data to be served via standardised REST endpoints, consumable by any OGC-compliant client.
47+
**pydggsapi** implements the [OGC API - DGGS](https://ogcapi.ogc.org/dggs/) standard with IGEO7 as a supported reference system. This allows IGEO7-indexed data to be served via standardised REST endpoints, consumable by any OGC-compliant client.
6948

70-
Supported backends: Clickhouse (columnar analytics), Zarr (cloud-native arrays), Parquet.
49+
Supported backends: Clickhouse (columnar analytics), Zarr (cloud-native arrays), Parquet (via DuckDB).
7150

7251
See [pydggsapi ecosystem page](../ecosystem/pydggsapi).
7352

@@ -79,7 +58,7 @@ See [pydggsapi ecosystem page](../ecosystem/pydggsapi).
7958
| Density maps (events/km²) | Biased | Equal area eliminates bias |
8059
| Area statistics (land cover) | Biased | Equal area eliminates bias |
8160
| Scientific reproducibility | Varies by location | Consistent everywhere |
82-
| Very fine resolution (< 1 m) | No (max res 15 ~1 m²) | Res 18–20 reach centimetres |
61+
| Very fine resolution (< 1 m) | No (max res 15 ~1 m²) | Res 18-20 reach centimetres |
8362
| Cloud-native data cubes | Limited | Xarray-XDGGS integration |
8463
| OGC API DGGS compliance | Partial | pydggsapi native support |
8564

‎website/docs/installation.md‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Installation
66

77
# Installation
88

9-
IGEO7 is implemented in **DGGRID** (the core C++ engine) and accessed via the **dggrid4py** Python wrapper. You need both.
9+
IGEO7 is implemented in **DGGRID** (the core C++ engine) and accessed via the **dggrid4py** Python wrapper.
1010

1111
## 1. Install DGGRID
1212

@@ -16,6 +16,19 @@ DGGRID is a C++ command-line tool. You need a compiled binary on your system.
1616

1717
Download a pre-built binary from the [DGGRID releases page](https://github.com/sahrk/DGGRID/releases).
1818

19+
### With conda / mamba (or even Julia)
20+
21+
or install from conda-forge (via Pixi or micomamba)
22+
23+
```bash
24+
conda install -c conda-forge dggrid
25+
```
26+
27+
```julia
28+
using Pkg; Pkg.add("DggridRunners")
29+
```
30+
31+
1932
### Build from source
2033

2134
```bash
@@ -37,7 +50,7 @@ dggrid --version
3750

3851
### Setting the path
3952

40-
dggrid4py locates the DGGRID binary via the `DGGRID_PATH` environment variable or an explicit path in the API call:
53+
dggrid4py requires the DGGRID binary via the `DGGRID_PATH` environment variable or an explicit path in the API call:
4154

4255
```bash
4356
export DGGRID_PATH=/usr/local/bin/dggrid
@@ -47,17 +60,12 @@ export DGGRID_PATH=/usr/local/bin/dggrid
4760

4861
dggrid4py is the Python wrapper that drives DGGRID programmatically.
4962

50-
### With pip
63+
### With pip (or uv or pixi)
5164

5265
```bash
5366
pip install dggrid4py
5467
```
5568

56-
### With conda / mamba
57-
58-
```bash
59-
conda install -c conda-forge dggrid4py
60-
```
6169

6270
### Dependencies
6371

@@ -82,7 +90,7 @@ pip install dggal
8290

8391
```python
8492
import os
85-
from dggrid4py import DGGRIDv7
93+
from dggrid4py import DGGRIDv8
8694

8795
dggrid = DGGRIDv7(
8896
executable=os.environ.get("DGGRID_PATH", "/usr/local/bin/dggrid"),

‎website/docs/intro.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: Introduction
88

99
IGEO7 is a **hierarchically indexed hexagonal equal-area Discrete Global Grid System (DGGS)** with the **Z7** indexing system.
1010

11-
It is the **equal-area alternative to H3** — sharing the aperture 7 hexagonal hierarchy and 64-bit integer indexing of H3, but using the **ISEA (Icosahedral Snyder Equal Area)** projection instead of H3's gnomonic projection. This guarantees all cells have truly equal area (H3 cells vary by up to ±50%).
11+
It is the **equal-area alternative to H3**, sharing the aperture 7 hexagonal hierarchy and a comparable 64-bit integer indexing of H3, but using the **ISEA (Icosahedral Snyder Equal Area)** projection instead of H3's gnomonic projection. This guarantees all cells have truly equal area (H3 cells vary by up to ±50%).
1212

1313
:::tip Key paper
1414
IGEO7 is described in: Kmoch, A., Sahr, K., Chan, W.T., Uuemaa, E. (2025). *IGEO7: A new hierarchically indexed hexagonal equal-area discrete global grid system.* AGILE: GIScience Series, 6, 32. [https://doi.org/10.5194/agile-giss-6-32-2025](https://doi.org/10.5194/agile-giss-6-32-2025)
@@ -19,18 +19,18 @@ IGEO7 is described in: Kmoch, A., Sahr, K., Chan, W.T., Uuemaa, E. (2025). *IGEO
1919
A **Discrete Global Grid System** partitions the entire surface of the Earth into a finite set of non-overlapping cells, providing a framework for spatial indexing, aggregation, and analysis at any resolution.
2020

2121
IGEO7 is implemented in:
22-
- **DGGRID** (C++) — the core engine
23-
- **DGGAL** — supports ISEA7H_Z7
24-
- **dggrid4py** — Python wrapper
25-
- **pydggsapi** — OGC API DGGS server
22+
- **DGGRID** (C++) — the original reference implementation of ISEA7H and Z7
23+
- **DGGAL** — supports IGEO7 via ISEA7H_Z7
24+
- **dggrid4py** — Python wrapper for DGGRID, can take care of correct definitions
25+
- **pydggsapi** — OGC API DGGS server that supports both dggrid4py and dggal
2626

2727
## Core Properties
2828

2929
| Property | IGEO7 | H3 |
3030
|---|---|---|
3131
| Projection | ISEA (equal area) | Gnomonic |
3232
| Cell shape | Hexagons + 12 pentagons | Hexagons + 12 pentagons |
33-
| Aperture | Pure 7 | Mixed (4→3→7) |
33+
| Aperture | Pure 7 | Custom toplevel, then 7 |
3434
| Resolutions | 0–20 (21 levels) | 0–15 (16 levels) |
3535
| Base cells | 12 | 122 |
3636
| Index size | 64-bit integer | 64-bit integer |

‎website/docs/quickstart.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ title: Quickstart
88

99
From zero to working IGEO7 cells in Python using **dggrid4py**.
1010

11+
TODO:
12+
- Apply authalic conversion in dggrid4py
13+
- Provide parameter 11.2
14+
1115
## Setup
1216

1317
```python

‎website/docs/reference/restable.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
id: restable
33
sidebar_position: 1
4-
title: Resolution Table
4+
title: Refinement Level Table
55
---
66

77
# Resolution Table
88

9-
IGEO7 has **21 resolution levels** (0–20). At every resolution, the grid contains exactly **12 pentagons** (at icosahedron vertices) and all remaining cells are hexagons.
9+
IGEO7 has **21 resolution levels** (0–20). At every refinement level, the grid contains exactly **12 pentagons** (at icosahedron vertices) and all remaining cells are hexagons. Level 0 is only the 12 base pentagons.
1010

1111
**CLS** (Characteristic Length Scale) is the diameter of a circle with the same area as a cell — the most intuitive way to relate IGEO7 resolutions to traditional raster pixel sizes.
1212

@@ -100,6 +100,7 @@ dggrid = DGGRIDv7(
100100
silent=True,
101101
)
102102

103-
df = dggrid.grid_stats_table("IGEO7", 20)
103+
# yes, ISEA7H, IGEO7 is not recognized as a grid for resolutions in itself :-)
104+
df = dggrid.grid_stats_table("ISEA7H", 20)
104105
print(df.to_string())
105106
```

‎website/src/components/HomepageFeatures/index.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ const FeatureList = [
88
icon: "⬡",
99
description: (
1010
<>
11-
Every cell has the same area at each resolution — guaranteed by the ISEA
11+
Every cell has the same area at each resolution, based on the ISEA
1212
(Icosahedral Snyder Equal Area) projection. No ±50% distortions like in
13-
gnomonic-based systems.
13+
H3, S2, GeoHash, or Mercator-based systems.
1414
</>
1515
),
1616
},
@@ -20,7 +20,7 @@ const FeatureList = [
2020
description: (
2121
<>
2222
A single 64-bit integer encodes resolution, base cell, and full
23-
hierarchical path. Parent–child relationships are simple bit operations.
23+
hierarchical path. Parent-child relationships are simple bit operations.
2424
Compatible with H3-style workflows.
2525
</>
2626
),

0 commit comments

Comments
 (0)