dggal 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. dggal-0.0.1/PKG-INFO +493 -0
  2. dggal-0.0.1/README.md +453 -0
  3. dggal-0.0.1/dgg_wrapper.py +13 -0
  4. dggal-0.0.1/dggal/BUILDING.md +89 -0
  5. dggal-0.0.1/dggal/CONTRIBUTORS +20 -0
  6. dggal-0.0.1/dggal/LICENSE +28 -0
  7. dggal-0.0.1/dggal/Makefile +51 -0
  8. dggal-0.0.1/dggal/Makefile.dgg +316 -0
  9. dggal-0.0.1/dggal/Makefile.dgg.static +338 -0
  10. dggal-0.0.1/dggal/Makefile.dggal +435 -0
  11. dggal-0.0.1/dggal/Makefile.dggal.static +393 -0
  12. dggal-0.0.1/dggal/README.md +507 -0
  13. dggal-0.0.1/dggal/bindings/c/Makefile +32 -0
  14. dggal-0.0.1/dggal/bindings/c/Makefile.dggal_c +160 -0
  15. dggal-0.0.1/dggal/bindings/c/dggal.c +652 -0
  16. dggal-0.0.1/dggal/bindings/c/dggal.h +748 -0
  17. dggal-0.0.1/dggal/bindings/py/__init__.py +20 -0
  18. dggal-0.0.1/dggal/bindings/py/build_dggal.py +110 -0
  19. dggal-0.0.1/dggal/bindings/py/cffi-dggal.h +493 -0
  20. dggal-0.0.1/dggal/bindings/py/dggal.py +1815 -0
  21. dggal-0.0.1/dggal/bindings_examples/c/Makefile +156 -0
  22. dggal-0.0.1/dggal/bindings_examples/c/Makefile.static +200 -0
  23. dggal-0.0.1/dggal/bindings_examples/c/info.c +220 -0
  24. dggal-0.0.1/dggal/bindings_examples/c/info.epj +105 -0
  25. dggal-0.0.1/dggal/bindings_examples/cpp/Makefile +177 -0
  26. dggal-0.0.1/dggal/bindings_examples/cpp/Makefile.static +192 -0
  27. dggal-0.0.1/dggal/bindings_examples/cpp/info.cpp +213 -0
  28. dggal-0.0.1/dggal/bindings_examples/cpp/info.epj +129 -0
  29. dggal-0.0.1/dggal/bindings_examples/py/geom.py +110 -0
  30. dggal-0.0.1/dggal/bindings_examples/py/info.py +88 -0
  31. dggal-0.0.1/dggal/bindings_examples/py/list.py +80 -0
  32. dggal-0.0.1/dggal/bindings_examples/py/togeo.py +91 -0
  33. dggal-0.0.1/dggal/bindings_examples/py/togeo_json.py +115 -0
  34. dggal-0.0.1/dggal/bindings_examples/py/togeo_text.py +135 -0
  35. dggal-0.0.1/dggal/bindings_examples/rust/Makefile +73 -0
  36. dggal-0.0.1/dggal/bindings_examples/rust/info.rs +224 -0
  37. dggal-0.0.1/dggal/commands/compact.ec +8 -0
  38. dggal-0.0.1/dggal/commands/decompact.ec +8 -0
  39. dggal-0.0.1/dggal/commands/geom.ec +139 -0
  40. dggal-0.0.1/dggal/commands/grid.ec +48 -0
  41. dggal-0.0.1/dggal/commands/index.ec +38 -0
  42. dggal-0.0.1/dggal/commands/info.ec +120 -0
  43. dggal-0.0.1/dggal/commands/level.ec +74 -0
  44. dggal-0.0.1/dggal/commands/list.ec +79 -0
  45. dggal-0.0.1/dggal/commands/rel.ec +87 -0
  46. dggal-0.0.1/dggal/commands/sub.ec +100 -0
  47. dggal-0.0.1/dggal/commands/togeo.ec +113 -0
  48. dggal-0.0.1/dggal/commands/zone.ec +36 -0
  49. dggal-0.0.1/dggal/dgg.ec +270 -0
  50. dggal-0.0.1/dggal/dgg.epj +111 -0
  51. dggal-0.0.1/dggal/dggal.epj +139 -0
  52. dggal-0.0.1/dggal/docs/dggal/CRS.econ +14 -0
  53. dggal-0.0.1/dggal/docs/dggal/CRSExtent.econ +14 -0
  54. dggal-0.0.1/dggal/docs/dggal/CRSRegistry.econ +12 -0
  55. dggal-0.0.1/dggal/docs/dggal/DGGRS.econ +746 -0
  56. dggal-0.0.1/dggal/docs/dggal/DGGRSZone.econ +3 -0
  57. dggal-0.0.1/dggal/docs/dggal/DGGSJSON.econ +3 -0
  58. dggal-0.0.1/dggal/docs/dggal/DGGSJSONDepth.econ +3 -0
  59. dggal-0.0.1/dggal/docs/dggal/DGGSJSONGrid.econ +3 -0
  60. dggal-0.0.1/dggal/docs/dggal/DGGSJSONShape.econ +3 -0
  61. dggal-0.0.1/dggal/docs/dggal/FieldType.econ +27 -0
  62. dggal-0.0.1/dggal/docs/dggal/FieldTypeEx.econ +21 -0
  63. dggal-0.0.1/dggal/docs/dggal/FieldValue.econ +26 -0
  64. dggal-0.0.1/dggal/docs/dggal/FieldValueFormat.econ +3 -0
  65. dggal-0.0.1/dggal/docs/dggal/GGGZone.econ +3 -0
  66. dggal-0.0.1/dggal/docs/dggal/GNOSISGlobalGrid.econ +3 -0
  67. dggal-0.0.1/dggal/docs/dggal/GeoExtent.econ +24 -0
  68. dggal-0.0.1/dggal/docs/dggal/GeoPoint.econ +11 -0
  69. dggal-0.0.1/dggal/docs/dggal/I3HZone.econ +3 -0
  70. dggal-0.0.1/dggal/docs/dggal/I9RZone.econ +3 -0
  71. dggal-0.0.1/dggal/docs/dggal/ISEA3H.econ +3 -0
  72. dggal-0.0.1/dggal/docs/dggal/ISEA9R.econ +3 -0
  73. dggal-0.0.1/dggal/docs/dggal/JSONSchema.econ +4 -0
  74. dggal-0.0.1/dggal/docs/dggal/JSONSchemaType.econ +3 -0
  75. dggal-0.0.1/dggal/docs/dggal/_global-defs.econ +44 -0
  76. dggal-0.0.1/dggal/fetchAndBuild.bat +106 -0
  77. dggal-0.0.1/dggal/fetchAndBuild.sh +106 -0
  78. dggal-0.0.1/dggal/src/GeoExtent.ec +148 -0
  79. dggal-0.0.1/dggal/src/dggrs/BCTA3H.ec +12 -0
  80. dggal-0.0.1/dggal/src/dggrs/GNOSISGlobalGrid.ec +801 -0
  81. dggal-0.0.1/dggal/src/dggrs/GPP3H.ec +13 -0
  82. dggal-0.0.1/dggal/src/dggrs/I3HSubZones.ec +1844 -0
  83. dggal-0.0.1/dggal/src/dggrs/ISEA3H.ec +13 -0
  84. dggal-0.0.1/dggal/src/dggrs/ISEA9R.ec +15 -0
  85. dggal-0.0.1/dggal/src/dggrs/IVEA3H.ec +13 -0
  86. dggal-0.0.1/dggal/src/dggrs/IVEA9R.ec +13 -0
  87. dggal-0.0.1/dggal/src/dggrs/RI3H.ec +2225 -0
  88. dggal-0.0.1/dggal/src/dggrs/RI9R.ec +901 -0
  89. dggal-0.0.1/dggal/src/dggrs/RTEA3H.ec +13 -0
  90. dggal-0.0.1/dggal/src/dggrs/RTEA9R.ec +13 -0
  91. dggal-0.0.1/dggal/src/dggrs.ec +470 -0
  92. dggal-0.0.1/dggal/src/dggsJSON/JSONSchema.ec +137 -0
  93. dggal-0.0.1/dggal/src/dggsJSON/dggsJSON.ec +104 -0
  94. dggal-0.0.1/dggal/src/ecere3D/Plane.ec +25 -0
  95. dggal-0.0.1/dggal/src/ecere3D/Quaternion.ec +22 -0
  96. dggal-0.0.1/dggal/src/ecere3D/Vector3D.ec +59 -0
  97. dggal-0.0.1/dggal/src/projections/authalic.ec +74 -0
  98. dggal-0.0.1/dggal/src/projections/barycentric5x6.ec +118 -0
  99. dggal-0.0.1/dggal/src/projections/icoVertexGreatCircle.ec +645 -0
  100. dggal-0.0.1/dggal/src/projections/ri5x6.ec +1415 -0
  101. dggal-0.0.1/dggal/tests/Makefile +260 -0
  102. dggal-0.0.1/dggal/tests/dggalTest.ec +409 -0
  103. dggal-0.0.1/dggal/tests/dggalTest.epj +63 -0
  104. dggal-0.0.1/dggal/tests/dggrs/isea3HTests.ec +530 -0
  105. dggal-0.0.1/dggal/tests/dggrsTestCase.ec +34 -0
  106. dggal-0.0.1/dggal.egg-info/SOURCES.txt +105 -0
  107. dggal-0.0.1/setup.cfg +4 -0
  108. dggal-0.0.1/setup.py +267 -0
dggal-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,493 @@
1
+ Metadata-Version: 2.2
2
+ Name: dggal
3
+ Version: 0.0.1
4
+ Summary: The Discrete Global Grid Abstraction Library (DGGAL)
5
+ Home-page: https://dggal.org
6
+ Author: Jérôme Jacovella-St-Louis, Ecere Corporation
7
+ Author-email: jerome@ecere.com
8
+ License: BSD-3-Clause
9
+ Keywords: dggs hexagonal-grid global-grid ogc ogc-api gnosis dggrs isea ivea rtea isea3h isea9r ivea3h ivea9r slice-and-dice polyhedral-globe icosahedral
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Operating System :: Microsoft :: Windows
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Other
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Software Development :: Libraries
19
+ Classifier: Topic :: Scientific/Engineering :: GIS
20
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
21
+ Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
22
+ Classifier: Topic :: Scientific/Engineering :: Hydrology
23
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
24
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
25
+ Classifier: Topic :: Scientific/Engineering :: Oceanography
26
+ Classifier: Topic :: Scientific/Engineering :: Visualization
27
+ Description-Content-Type: text/markdown
28
+ Requires-Dist: ecrt
29
+ Requires-Dist: cffi>=1.0.0
30
+ Dynamic: author
31
+ Dynamic: author-email
32
+ Dynamic: classifier
33
+ Dynamic: description
34
+ Dynamic: description-content-type
35
+ Dynamic: home-page
36
+ Dynamic: keywords
37
+ Dynamic: license
38
+ Dynamic: requires-dist
39
+ Dynamic: summary
40
+
41
+ [![DGGAL docs](https://img.shields.io/badge/docs-API_documentation-green.svg)](https://dggal.org/docs/html/dggal/Classes/DGGRS.html)<br>
42
+
43
+ # DGGAL, the Discrete Global Grid Abstraction Library
44
+
45
+ https://dggal.org
46
+
47
+ DGGAL provides a common interface to perform various operations on Discrete Global Grid Reference Systems (DGGRS), facilitating the implementation of Discrete Global Grid Systems (DGGS),
48
+ including implementing Web APIs based on the [OGC API - DGGS Standard](https://docs.ogc.org/DRAFTS/21-038r1.html).
49
+
50
+ Copyright (c) 2014-2025, Ecere Corporation
51
+
52
+ Licensed under the [BSD 3-Clause License](https://opensource.org/license/bsd-3-clause)
53
+
54
+ Source: https://github.com/ecere/dggal
55
+
56
+ Python packaging: https://github.com/ecere/pydggal
57
+
58
+ ## Supported Discrete Global Grid Reference Systems
59
+
60
+ DGGAL currently supports all three DGGRS described in [OGC API - DGGS Annex B](https://docs.ogc.org/DRAFTS/21-038r1.html#annex-dggrs-def), as well as additional DGGRSs:
61
+
62
+ * [GNOSIS Global Grid](https://docs.ogc.org/DRAFTS/21-038r1.html#ggg-dggrs): An axis-aligned quad-tree defined in WGS84 latitude and longitude, with special handling of polar regions, corresponding to the [OGC 2D Tile Matrix Set of the same name](https://docs.ogc.org/is/17-083r4/17-083r4.html#toc58)
63
+ * [ISEA3H](https://docs.ogc.org/DRAFTS/21-038r1.html#isea3h-dggrs): An equal area hexagonal grid with a refinement ratio of 3 defined in the Icosahedral Snyder Equal Area (ISEA) projection
64
+ * [ISEA9R](https://docs.ogc.org/DRAFTS/21-038r1.html#isea9r-dggrs): An equal area rhombic grid with a refinement ratio of 9 defined in the ISEA projection transformed into a 5x6 Cartesian space resulting in axis-aligned square zones
65
+ * **IVEA3H**: An equal area hexagonal grid with a refinement ratio of 3 defined in the Icosahedral Vertex-oriented Great Circle Equal Area (tentatively called IVEA) projection based on [Slice & Dice (2006)](https://www.tandfonline.com/doi/abs/10.1559/152304006779500687), using the same global indexing and sub-zone ordering as for ISEA3H
66
+ * **IVEA9R**: An equal area rhombic grid with a refinement ratio of 9 defined in the IVEA projection transformed into a 5x6 Cartesian space resulting in axis-aligned square zones, using the same global indexing and sub-zone ordering as for ISEA9R
67
+
68
+ ## libDGGAL API Documentation
69
+
70
+ The `DGGRS` class provides most of the functionality of the library, allowing to resolve DGGRS zones by textual ID to a unique 64-bit zone integer identifier (`DGGRSZone`).
71
+ The geometry and sub-zones of a particular zone can also be queried.
72
+ The concept of [sub-zones](https://docs.ogc.org/DRAFTS/21-038r1.html#term-sub-zone) is key to encoding both vector and raster geospatial data quantized to a DGGRS.
73
+ The DGGAL library also allows to resolve a sub-zone index at a particular depth from a parent zone, allowing to read DGGS-optimized data such as
74
+ [DGGS-JSON](http://dggs-json.org) and [DGGS-JSON-FG](https://docs.ogc.org/DRAFTS/21-038r1.html#rc_data-dggs-jsonfg).
75
+
76
+ A very early draft of the API documentation can be [found here](https://dggal.org/docs/html/dggal/Classes/DGGRS.html).
77
+
78
+ While the library is written in the [eC programming language](https://ec-lang.org), object-oriented bindings for C, C++ and Python generated using the
79
+ Ecere SDK's [`bgen` tool](https://github.com/ecere/bgen) are provided. Partial bindings for rust are available as well.
80
+ Support for additional languages may be added in the future.
81
+
82
+ ## `dgg` tool
83
+
84
+ ### Syntax
85
+ ```
86
+ dgg <dggrs> <command> [options] <arguments>
87
+ ```
88
+
89
+ ### Supported DGGRSs
90
+ * `gnosis` (Global Grid)
91
+ * `isea3h`
92
+ * `isea9r`
93
+ * `ivea3h`
94
+ * `ivea9r`
95
+
96
+ ### Commands
97
+
98
+ [**info**](#info) [_zone_]
99
+
100
+ - Display information about a DGGRS or about a zone of a DGGRS
101
+
102
+ [**zone**](#zone) <_coord1,coord2_> [_level_]
103
+
104
+ - Return DGGRS zone at position -- specified in EPSG:4326 (lat,lon)
105
+
106
+ [**level**](#level) [_level_]
107
+
108
+ - Display information about a DGGRS refinement level
109
+
110
+ [**grid**](#grid) [_level_]
111
+ - Generate DGGRS grid at specified refinement level (default: 0)
112
+
113
+ [**geom**](#geom) <_zone_>
114
+ - Generate geometry for a particular zone
115
+
116
+ [**list**](#list) [_level_]
117
+ - List DGGRS zones (as JSON string array)
118
+
119
+ [**rel**](#rel) <_zone 1_> <_zone 2_>
120
+ - Display information about the relationships between two zones of a DGGRS
121
+
122
+ [**sub**](#sub) <_zone_> [_index_]
123
+ - List subzones of a DGGRS zone or resolve a sub-zone by index
124
+
125
+ [**index**](#index) <_parent zone_> <_sub-zone_>
126
+ - Display index of sub-zone within parent
127
+
128
+ **compact** <_JSON input zone file (zone ID strings array)_>
129
+ - Compact input zone list
130
+
131
+ **decompact** <_JSON input zone file (zone ID strings array)_> [_level_]
132
+ - Decompact zone list
133
+
134
+ [**togeo**](#togeo) <_DGGS-(UB)JSON(-FG) input file_>
135
+ - Convert DGGS-JSON (DGGS-quantized raster data) or DGGS-JSON-FG (DGGS-quantized vector data) to GeoJSON
136
+
137
+ ### Options
138
+
139
+ **-o** <_filename_>
140
+ - Output to file instead of standard output
141
+
142
+ **-crs** <_crs_>
143
+ - Select an output coordinate reference system, one of:
144
+ EPSG:4326, OGC:CRS84, ISEA, 5x6
145
+
146
+ **-depth** <_relative depth_>
147
+ - For sub, specify relative depth
148
+ Also to change depth considered for calculating optional [level] from -scale, -mpp and -pixels
149
+ default: depth corresponding to ~64K sub-zones (IS/VEA9R: 5, IS/VEA3H: 10, GNOSIS: 8)
150
+
151
+ **-bbox** <_llLat,llLon,urLat,urLon_>
152
+ - Specify extent for which to list zones, generate grid, or reference extent for -pixels
153
+ example: -bbox 60,-120,62,-118 -- specified in EPSG:4326 (lat,lon)
154
+
155
+ **-centroids**
156
+ - For sub, list centroids instead of sub-zone identifiers
157
+ For togeo, use centroid points for geometry instead of polygons
158
+
159
+ **-compact**
160
+ - For list and grid, return compact list of zones
161
+
162
+ **-mpp** <_physical meters per sub-zone_>
163
+ - Specify physical meters per sub-zone as substitute for optional [level] arguments
164
+
165
+ **-scale-denom** <_scale denominator_>
166
+ - Specify scale-denominator as substitute for optional [level] arguments (based on -depth)
167
+
168
+ **-pixels** <_with,height_>
169
+ - Specify display pixels as a substitute for optional [level] argument (in combination with -bbox)
170
+
171
+ **-display-res** <_mm-per-pixels_>
172
+ - Specify display resolution in millimeters/pixel in combination with -scale and -pixels (default: 0.28)
173
+
174
+ ### Example Usage
175
+
176
+ #### `info`
177
+
178
+ ##### Information about a particular DGGRS
179
+
180
+ ```
181
+ > dgg isea3h info
182
+ DGGRS: https://maps.gnosis.earth/ogcapi/dggrs/ISEA3H
183
+ Refinement Ratio: 3
184
+ Maximum level for 64-bit global identifiers (DGGAL DGGRSZone): 33
185
+ Default ~64K sub-zones relative depth: 10
186
+ ```
187
+
188
+ ##### Information about a particular zone
189
+
190
+ ```
191
+ > dgg isea3h info A4-0-A
192
+ DGGRS: https://maps.gnosis.earth/ogcapi/dggrs/ISEA3H
193
+ Textual Zone ID: A4-0-A
194
+ 64-bit integer ID: 72057594037927936 (0x100000000000000)
195
+
196
+ Level 0 zone (5 edges, centroid child)
197
+ 42505468477007.4 m² (42505468.4770074 km²)
198
+ 49411 sub-zones at depth 10
199
+ WGS84 Centroid (lat, lon): 0, -20.517474411461
200
+ WGS84 Extent (lat, lon): { -35.385453143805, -57.894842551487 }, { 35.3854531438384, 11.2 }
201
+
202
+ No parent
203
+
204
+ Children (6):
205
+ A4-0-D (centroid)
206
+ A4-0-E
207
+ A4-0-F
208
+ A3-0-E
209
+ A2-0-F
210
+ A2-0-E
211
+
212
+ Neighbors (5):
213
+ (direction 2): A2-0-A
214
+ (direction 3): A6-0-A
215
+ (direction 0): A0-0-B
216
+ (direction 6): A3-0-A
217
+ (direction 7): A5-0-A
218
+
219
+ [EPSG:4326] Vertices (5):
220
+ 20.9908533396875, 11.2
221
+ -20.9908533396875, 11.2
222
+ -35.385453143805, -33.7999999994894
223
+ 0.0000000010850795, -57.894842551487
224
+ 35.3854531438384, -33.8000000009355
225
+ ```
226
+
227
+ #### `zone`
228
+
229
+ Identify zone at a particular geodetic position.
230
+
231
+ ```
232
+ > dgg isea3h zone 34,-70
233
+ DGGRS: https://maps.gnosis.earth/ogcapi/dggrs/ISEA3H
234
+ Textual Zone ID: A2-0-A
235
+ 64-bit integer ID: 36028797018963968 (0x80000000000000)
236
+
237
+ Level 0 zone (5 edges, centroid child)
238
+ 42505468477007.4 m² (42505468.4770074 km²)
239
+ 49411 sub-zones at depth 10
240
+ WGS84 Centroid (lat, lon): 31.832359041336, -78.8
241
+ WGS84 Extent (lat, lon): { 0.00000000095824612, -123.799999999422 }, { 69.1802100999282, -33.8000000009355 }
242
+
243
+ No parent
244
+
245
+ Children (6):
246
+ A2-0-D (centroid)
247
+ A2-0-E
248
+ A2-0-F
249
+ A1-0-E
250
+ A0-0-F
251
+ A0-0-E
252
+
253
+ Neighbors (5):
254
+ (direction 2): A0-0-A
255
+ (direction 3): A4-0-A
256
+ (direction 0): A0-0-B
257
+ (direction 6): A1-0-A
258
+ (direction 7): A3-0-A
259
+
260
+ [EPSG:4326] Vertices (5):
261
+ 35.3854531438384, -33.8000000009355
262
+ 0.0000000010850795, -57.894842551487
263
+ 0.00000000095824612, -99.7051574473385
264
+ 35.3854531459823, -123.799999999422
265
+ 69.1802100999282, -78.8000000030274
266
+ ```
267
+
268
+ #### `level`
269
+
270
+ ##### Information about levels of a particular DGGRS
271
+
272
+ ```
273
+ > dgg isea3h level
274
+ DGGRS: https://maps.gnosis.earth/ogcapi/dggrs/ISEA3H
275
+ Assuming sub-zone depth of 10 and display resolution of 0.28 mm/pixel:
276
+ Level Reference Area Sub-zones count Sub-zone area Scale Meters/Sub-zone
277
+ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
278
+ 0: 42505468477007.39843750 m² (42505468.47700740 km²) 49411 860243032.46255684 m² ( 8602430324625.56933594 cm²) 1: 104965840 29390.43523832 m ( 2939043.52383217 cm)
279
+ 1: 15939550678877.77343750 m² (15939550.67887777 km²) 59293 268826854.41582942 m² ( 2688268544158.29394531 cm²) 1: 60602124 16968.59485403 m ( 1696859.48540341 cm)
280
+ 2: 5544191540479.22558594 m² ( 5544191.54047923 km²) 59293 93504992.84028849 m² ( 935049928402.88488770 cm²) 1: 34988666 9796.82649363 m ( 979682.64936343 cm)
281
+ 3: 1875241256338.56152344 m² ( 1875241.25633856 km²) 59293 31626688.75480346 m² ( 316266887548.03460693 cm²) 1: 20200718 5656.20112285 m ( 565620.11228463 cm)
282
+ 4: 628159632665.13391113 m² ( 628159.63266513 km²) 59293 10594161.75037751 m² ( 105941617503.77513123 cm²) 1: 11662891 3265.60937742 m ( 326560.93774175 cm)
283
+ 5: 209730929985.23385620 m² ( 209730.92998523 km²) 59293 3537195.45283986 m² ( 35371954528.39860535 cm²) 1: 6733573 1885.40047940 m ( 188540.04793995 cm)
284
+ 6: 69948659040.60459900 m² ( 69948.65904060 km²) 59293 1179711.92283414 m² ( 11797119228.34138870 cm²) 1: 3887630 1088.53647937 m ( 108853.64793690 cm)
285
+ 7: 23320483802.30837250 m² ( 23320.48380231 km²) 59293 393309.22372470 m² ( 3933092237.24695539 cm²) 1: 2244524 628.46683036 m ( 62846.68303597 cm)
286
+ 8: 7773968507.65239239 m² ( 7773.96850765 km²) 59293 131111.06720275 m² ( 1311110672.02745557 cm²) 1: 1295877 362.84549387 m ( 36284.54938723 cm)
287
+ 9: 2591375496.48476219 m² ( 2591.37549648 km²) 59293 43704.57720953 m² ( 437045772.09531683 cm²) 1: 748175 209.48894360 m ( 20948.89435974 cm)
288
+ 10: 863797683.49797928 m² ( 863.79768350 km²) 59293 14568.29108829 m² ( 145682910.88290006 cm²) 1: 431959 120.94849799 m ( 12094.84979852 cm)
289
+ 11: 287933211.32035321 m² ( 287.93321132 km²) 59293 4856.10799454 m² ( 48561079.94541568 cm²) 1: 249392 69.82964787 m ( 6982.96478712 cm)
290
+ 12: 95977809.34637524 m² ( 95.97780935 km²) 59293 1618.70388320 m² ( 16187038.83196587 cm²) 1: 143986 40.31616600 m ( 4031.61659961 cm)
291
+ 13: 31992611.14208768 m² ( 31.99261114 km²) 59293 539.56809644 m² ( 5395680.96437820 cm²) 1: 83131 23.27654929 m ( 2327.65492906 cm)
292
+ 14: 10664204.60587722 m² ( 10.66420461 km²) 59293 179.85604719 m² ( 1798560.47187311 cm²) 1: 47995 13.43872200 m ( 1343.87219987 cm)
293
+ 15: 3554734.96771997 m² ( 3.55473497 km²) 59293 59.95201740 m² ( 599520.17400367 cm²) 1: 27710 7.75884976 m ( 775.88497635 cm)
294
+ 16: 1184911.66691713 m² ( 1.18491167 km²) 59293 19.98400599 m² ( 199840.05985818 cm²) 1: 15998 4.47957400 m ( 447.95739996 cm)
295
+ 17: 394970.55686243 m² ( 0.39497056 km²) 59293 6.66133535 m² ( 66613.35349239 cm²) 1: 9237 2.58628325 m ( 258.62832545 cm)
296
+ 18: 131656.85242341 m² ( 0.13165685 km²) 59293 2.22044512 m² ( 22204.45118706 cm²) 1: 5333 1.49319133 m ( 149.31913332 cm)
297
+ 19: 43885.61748957 m² ( 0.04388562 km²) 59293 0.74014837 m² ( 7401.48373157 cm²) 1: 3079 0.86209442 m ( 86.20944182 cm)
298
+ 20: 14628.53916487 m² ( 0.01462854 km²) 59293 0.24671612 m² ( 2467.16124414 cm²) 1: 1778 0.49773044 m ( 49.77304444 cm)
299
+ 21: 4876.17972181 m² ( 0.00487618 km²) 59293 0.08223871 m² ( 822.38708141 cm²) 1: 1026 0.28736481 m ( 28.73648061 cm)
300
+ 22: 1625.39324062 m² ( 0.00162539 km²) 59293 0.02741290 m² ( 274.12902714 cm²) 1: 593 0.16591015 m ( 16.59101481 cm)
301
+ 23: 541.79774688 m² ( 0.00054180 km²) 59293 0.00913763 m² ( 91.37634238 cm²) 1: 342 0.09578827 m ( 9.57882687 cm)
302
+ 24: 180.59924896 m² ( 0.00018060 km²) 59293 0.00304588 m² ( 30.45878079 cm²) 1: 129 0.03620456 m ( 3.62045625 cm)
303
+ 25: 60.19974965 m² ( 0.00006020 km²) 59293 0.00101529 m² ( 10.15292693 cm²) 1: 95 0.02656689 m ( 2.65668857 cm)
304
+ 26: 20.06658322 m² ( 0.00002007 km²) 59293 0.00033843 m² ( 3.38430898 cm²) 1: 56 0.01574749 m ( 1.57474944 cm)
305
+ 27: 6.68886107 m² ( 0.00000669 km²) 59293 0.00011281 m² ( 1.12810299 cm²) 1: 36 0.01004134 m ( 1.00413390 cm)
306
+ 28: 2.22962036 m² ( 0.00000223 km²) 59293 0.00003760 m² ( 0.37603433 cm²) 1: 21 0.00581872 m ( 0.58187229 cm)
307
+ 29: 0.74320679 m² ( 0.00000074 km²) 59293 0.00001253 m² ( 0.12534478 cm²) 1: 12 0.00348148 m ( 0.34814838 cm)
308
+ 30: 0.24773560 m² ( 0.00000025 km²) 59293 0.00000418 m² ( 0.04178159 cm²) 1: 7 0.00201092 m ( 0.20109213 cm)
309
+ 31: 0.08257853 m² ( 0.00000008 km²) 59293 0.00000139 m² ( 0.01392720 cm²) 1: 4 0.00117525 m ( 0.11752498 cm)
310
+ 32: 0.02752618 m² ( 0.00000003 km²) 59293 0.00000046 m² ( 0.00464240 cm²) 1: 2 0.00067856 m ( 0.06785649 cm)
311
+ 33: 0.00917539 m² ( 0.00000001 km²) 59293 0.00000015 m² ( 0.00154747 cm²) 1: 1 0.00039338 m ( 0.03933785 cm)
312
+ ```
313
+
314
+ ##### Information about a particular DGGRS level
315
+ ```
316
+ > dgg isea3h level 15
317
+ DGGRS: https://maps.gnosis.earth/ogcapi/dggrs/ISEA3H
318
+ Refinement Level: 15
319
+ Reference area: 3554734.96771997 m² (3.55473496771997 km²)
320
+
321
+ Assuming sub-zone depth of 10 (59293 sub-zones) and display resolution of 0.28 mm/pixel:
322
+ Sub-zones area: 59.9520174003672 m² (599520.174003672 cm²)
323
+ Cartographic scale: 1:27710
324
+ Physical meters/sub-zone: 7.75884976353492 (775.884976353492 cm/sub-zone)
325
+ ```
326
+
327
+ #### `grid`
328
+
329
+ ##### Generate grid geometry for a particular refinement level
330
+
331
+ Output is [GeoJSON](https://geojson.org/):
332
+
333
+ ```
334
+ > dgg isea3h -crs isea grid 3 > isea3h-level3-isea.geojson
335
+ ```
336
+
337
+ ![image](https://dggal.org/images/isea3h-grid-level3.png)
338
+
339
+ ```
340
+ > dgg isea3h grid 3 > isea3h-level3-crs84.geojson
341
+ ```
342
+
343
+ ![image](https://dggal.org/images/isea3h-grid-level3-crs84.png)
344
+
345
+ ##### Generate grid geometry for a given bounding box using compacted zones
346
+
347
+ ```
348
+ > dgg isea3h grid 15 -compact -bbox 44,-76,46,-74
349
+ ```
350
+
351
+ ![image](https://dggal.org/images/compact-grid.png)
352
+
353
+
354
+ #### `geom`
355
+
356
+ Generate geometry of a specific zone
357
+
358
+ ```
359
+ > dgg isea3h geom A4-0-A
360
+ ```
361
+
362
+ ```geojson
363
+ {
364
+ "type" : "Feature",
365
+ "id" : "A4-0-A",
366
+ "geometry" : {
367
+ "type" : "Polygon",
368
+ "coordinates" : [
369
+ [ [11.2, 20.9908533396875], [11.2, 18.9046368254835], [11.2, 16.817317021754], [11.2, 14.7282441160477], [11.2, 12.6367658994772], [11.2, 10.5422256002322], [11.2, 8.44395966388283], [11.2, 6.3412954618102], [11.2, 4.2335489079295], [11.2, 2.12002196235325], [11.2, -0.00000000000000958], [11.2, -2.12002196235327], [11.2, -4.2335489079295], [11.2, -6.34129546181022], [11.2, -8.44395966388284], [11.2, -10.5422256002322], [11.2, -12.6367658994773], [11.2, -14.7282441160477], [11.2, -16.817317021754], [11.2, -18.9046368254835], [11.2, -20.9908533396875], [9.25904611568614, -22.022704447347], [7.2894978850024, -23.0315860032884], [5.2895073521231, -24.0162595826945], [3.2572732870332, -24.9754140020123], [1.19105174674043, -25.907662551343], [-0.910831437312103, -26.8115406666264], [-3.04996620024865, -27.6855041419538], [-5.22784181139874, -28.5279279934546], [-7.44582852527487, -29.3371060956138], [-9.70515744760715, -30.111251717508], [-11.9990182364648, -30.8460627665615], [-14.3199274459944, -31.5377272377057], [-16.6678118661126, -32.1851262644314], [-19.0423550054196, -32.7871381036537], [-21.4429904142008, -33.3426478478608], [-23.868897601607, -33.8505577351568], [-26.319001132268, -34.3097979200868], [-28.791973441741, -34.7193375329077], [-31.2862418322802, -35.0781958218138], [-33.7999999994894, -35.385453143805], [-35.328584064796, -33.7294909375037], [-36.7997931901407, -32.0544538235723], [-38.2190895198383, -30.3615150627895], [-39.591520816704, -28.651669714028], [-40.9217621171856, -26.9257555850354], [-42.2141557503646, -25.184471421695], [-43.4727493595782, -23.4283926793226], [-44.7013318005733, -21.6579851878463], [-45.9034669523704, -19.8736169902905], [-47.0825255880168, -18.075568603016], [-48.2378134716698, -16.2702095110336], [-49.3687568644497, -14.463940351611], [-50.4786064975358, -12.656986739445], [-51.5704092970534, -10.8495265877445], [-52.647041014988, -9.04169850753405], [-53.7112358369818, -7.23360915100237], [-54.765613515085, -5.42533970970474], [-55.8127045186767, -3.61695174870332], [-56.8549736519885, -1.80849253470827], [-57.894842551487, 0.0000000010850795], [-56.8549736519113, 1.80849253683432], [-55.8127045185966, 3.61695175082982], [-54.7656135150002, 5.425339711832], [-53.7112358368904, 7.2336091531306], [-52.6470410148878, 9.04169850966353], [-51.5704092969423, 10.8495265898755], [-50.4786064974117, 12.6569867415778], [-49.36875686431, 14.4639403537457], [-48.237813471512, 16.2702095131705], [-47.082525588539, 18.0755686040723], [-45.9034669536086, 19.873616990275], [-44.7013318018277, 21.6579851878424], [-43.47274936085, 23.428392679331], [-42.214155751655, 25.1844714217162], [-40.9217621184958, 26.9257555850703], [-39.5915208180354, 28.651669714077], [-38.219089521192, 30.3615150628536], [-36.799793191518, 32.0544538236523], [-35.328584066198, 33.7294909376005], [-33.8000000009355, 35.3854531438384], [-31.2862418337828, 35.0781958220137], [-28.7919734432313, 34.7193375331383], [-26.3190011337452, 34.3097979203474], [-23.86889760307, 33.850557735447], [-21.442990415649, 33.34264784818], [-19.0423550068522, 32.787138104001], [-16.6678118675294, 32.1851262648063], [-14.319927447395, 31.5377272381076], [-11.9990182378492, 30.8460627669896], [-9.70515744897538, 30.1112517179616], [-9.7051574476072, 30.1112517175078], [-7.44582852527492, 29.3371060956137], [-5.2278418113988, 28.5279279934545], [-3.0499662002487, 27.6855041419537], [-0.91083143731212, 26.8115406666263], [1.1910517467404, 25.907662551343], [3.2572732870332, 24.9754140020123], [5.289507352124, 24.0162595826945], [7.28949788500238, 23.0315860032884], [9.259046115687, 22.022704447347], [11.2, 20.9908533396875] ]
370
+ ]
371
+ },
372
+ "properties" : {
373
+ "zoneID" : "A4-0-A"
374
+ }
375
+ }
376
+ ```
377
+
378
+ ```
379
+ > dgg -crs isea isea3h geom A4-0-A
380
+ ```
381
+
382
+ ![image](https://dggal.org/images/zone-geom.png)
383
+
384
+ #### `list`
385
+
386
+ ##### List zones of a given refinement level
387
+
388
+ ```
389
+ > dgg isea3h list 0
390
+ ```
391
+
392
+ ```json
393
+ [ "A0-0-A", "A0-0-B", "A1-0-A", "A2-0-A", "A3-0-A", "A4-0-A", "A5-0-A",
394
+ "A6-0-A", "A7-0-A", "A8-0-A", "A9-0-A", "A9-0-C" ]
395
+ ```
396
+
397
+ ##### List compacted zones of a given refinement level for a particular bounding box
398
+
399
+ ```
400
+ > dgg isea3h list 10 -compact -bbox 44,-76,46,-74
401
+ ```
402
+
403
+ ```json
404
+ [ "E0-1397-A", "F0-AAC7-A", "F0-ABB7-A", "F0-ABB8-A", "F0-ABB9-A", "F0-ABBA-A",
405
+ "F0-ABBB-A", "F0-ACA9-A", "F0-ACAA-A", "F0-ACAB-A", "F0-ACAC-A", "F0-ACAD-A",
406
+ "F0-ACAE-A", "F0-AD9D-A", "F0-AD9E-A", "F0-ADA1-A", "F0-ADA2-A", "F0-AE91-A",
407
+ "F0-AE95-A", "F0-AF84-A", "F0-AF85-A", "F0-AF88-A", "F0-AF89-A", "F0-B078-A",
408
+ "F0-B079-A", "F0-B07A-A", "F0-B07B-A", "F0-B07C-A", "F0-B16B-A", "F0-B16C-A",
409
+ "F0-B16D-A", "F0-B16E-A", "F0-B16F-A", "F0-B170-A", "F0-B25F-A", "F0-B260-A",
410
+ "F0-B261-A", "F0-B262-A", "F0-B263-A", "F0-B352-A", "F0-B353-A", "F0-B354-A",
411
+ "F0-B355-A", "F0-B356-A", "F0-B357-A", "F0-B446-A", "F0-B447-A", "F0-B448-A" ]
412
+ ```
413
+
414
+ #### `rel`
415
+
416
+ Show relationships between two zones
417
+
418
+ ```
419
+ > dgg isea3h rel A4-0-A D4-20-F
420
+ DGGRS: https://maps.gnosis.earth/ogcapi/dggrs/ISEA3H
421
+ Relationships between zones A4-0-A (A) and D4-20-F (B):
422
+
423
+ Zone A is coarser than zone B by 7 refinement levels
424
+ The area of zone A is greater than the area of zone B (area of B is 0.054869684499314 % of zone A)
425
+ Zone A is NOT an immediate child of zone B
426
+ Zone A is NOT an immediate parent of zone B
427
+ Zone A is NOT a descendant of zone B
428
+ Zone A is an ancestor of zone B
429
+ Zone A is NOT a sub-zone of zone B
430
+ Zone A has B as a sub-zone (at depth 7, index 1034)
431
+ These zones are NOT neighbors
432
+ These zones are NOT siblings
433
+ Zone A is NOT contained in zone B
434
+ Zone A contains zone B
435
+ Zone A and B overlap
436
+ ```
437
+
438
+ #### `sub`
439
+
440
+ ##### Query sub-zones of parent zone at a particular relative depth
441
+
442
+ ```
443
+ > dgg isea3h sub A4-0-A -depth 3
444
+ ```
445
+
446
+ ```json
447
+ [ "B2-7-D", "B2-4-F", "B2-4-E", "B2-5-D", "B2-7-F", "B2-7-E", "B2-8-D",
448
+ "B2-5-F", "B2-5-E", "B3-1-E", "B3-2-D", "B2-8-F", "B2-8-E", "B4-1-D",
449
+ "B4-1-E", "B3-5-D", "B3-2-F", "B3-2-E", "B4-0-D", "B4-0-E", "B4-1-F",
450
+ "B4-5-D", "B3-5-E", "B4-3-D", "B4-0-F", "B4-4-D", "B4-4-E", "B4-3-F",
451
+ "B4-3-E", "B4-4-F", "B4-7-D" ]
452
+ ```
453
+
454
+ ##### Identify sub-zone of parent zone at a particular relative depth and index
455
+
456
+ ```
457
+ > dgg isea3h sub A4-0-A 8 -depth 3
458
+ ```
459
+
460
+ ```json
461
+ "B2-5-E"
462
+ ```
463
+
464
+ #### `index`
465
+
466
+ ##### Query index of sub-zone
467
+
468
+ ```
469
+ > dgg isea3h index A4-0-A B2-5-E
470
+ DGGRS: https://maps.gnosis.earth/ogcapi/dggrs/ISEA3H
471
+ B2-5-E is at index 8 of A4-0-A at depth 3
472
+ ```
473
+
474
+ ```
475
+ > dgg isea3h index A4-0-A B6-5-E
476
+ DGGRS: https://maps.gnosis.earth/ogcapi/dggrs/ISEA3H
477
+ sub-zone B6-5-E not found within parent A4-0-A
478
+ ```
479
+
480
+ #### `togeo`
481
+
482
+ Converts [DGGS-JSON](http://dggs-json.org) (and eventually [DGGS-JSON-FG](https://docs.ogc.org/DRAFTS/21-038r1.html#rc_data-dggs-jsonfg) and [UBJSON](https://ubjson.org/) variants) to GeoJSON
483
+ to facilitate interoperability with traditional GIS software / software not aware of the DGGRS.
484
+
485
+ https://maps.gnosis.earth/ogcapi/collections/sentinel2-l2a/dggs/ISEA3H/zones/G7-67252-D/data.json?zone-depth=8&datetime=2022-10-28&properties=B08
486
+
487
+ ```
488
+ > dgg isea3h togeo -isea G7-67252-D-B08.json
489
+ ```
490
+
491
+ ![image](https://dggal.org/images/B08.png)
492
+
493
+ _B08 (near-infrared) band retrieved as DGGS-JSON data from [Copernicus/ESA sentinel-2](https://sentinel.esa.int/web/sentinel/missions/sentinel-2) converted to GeoJSON and visualized in QGIS_