DGGS Statistics
Statistics module for vgrid.
This module provides functions to calculate and display statistics for various discrete global grid systems (DGGS), including cell counts, areas, and edge lengths.
a5inspect(resolution, options={'segments': 'auto'}, split_antimeridian=False)
¶
Generate comprehensive inspection data for A5 DGGS cells at a given resolution.
This function creates a detailed analysis of A5 cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
A5 resolution level (0-29) |
required |
options
|
Optional dictionary of options for grid generation |
{'segments': 'auto'}
|
|
split_antimeridian
|
bool
|
When True, apply antimeridian splitting to the resulting polygons. Defaults to False when None or omitted. |
False
|
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing A5 cell inspection data with columns: - a5: A5 cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the Antimeridian - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/a5stats.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | |
a5inspect_cli()
¶
Command-line interface for A5 cell inspection.
Source code in vgrid/stats/a5stats.py
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 | |
a5stats_cli()
¶
Command-line interface for generating A5 DGGS statistics.
Source code in vgrid/stats/a5stats.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
dggalinspect(dggs_type, resolution, split_antimeridian=False)
¶
Generate detailed inspection data for a DGGAL DGGS type at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dggs_type
|
str
|
DGGS type supported by DGGAL |
required |
resolution
|
int
|
Resolution level |
required |
split_antimeridian
|
bool
|
When True, apply antimeridian splitting to the resulting polygons. Defaults to True when None or omitted. |
False
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
geopandas.GeoDataFrame with columns: - ZoneID (as provided by DGGAL output; no renaming is performed) - resolution - geometry - cell_area (m^2) - cell_perimeter (m) - crossed (bool) - norm_area (area/mean_area) - ipq (4πA/P²) - zsc (sqrt(4πA - A²/R²)/P), with R=WGS84 a |
Source code in vgrid/stats/dggalstats.py
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | |
dggalinspect_cli()
¶
Command-line interface for DGGAL cell inspection.
Source code in vgrid/stats/dggalstats.py
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 | |
dggalstats_cli()
¶
Command-line interface for generating DGGAL DGGS statistics.
Source code in vgrid/stats/dggalstats.py
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | |
dggridinspect(dggrid_instance, dggs_type, resolution, split_antimeridian=False, aggregate=False)
¶
Generate detailed inspection data for a DGGRID DGGS type at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dggrid_instance
|
DGGRID instance for grid operations |
required | |
dggs_type
|
str
|
DGGS type supported by DGGRID (see dggs_types) |
required |
resolution
|
int
|
Resolution level |
required |
split_antimeridian
|
bool
|
When True, apply antimeridian fixing to the resulting polygons. |
False
|
aggregate
|
bool
|
When True, aggregate the resulting polygons. Defaults to False to avoid aggregation by default. |
False
|
Source code in vgrid/stats/dggridstats.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
dggridinspect_cli()
¶
Command-line interface for DGGRID cell inspection.
Source code in vgrid/stats/dggridstats.py
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | |
dggridstats_cli()
¶
Command-line interface for generating DGGAL DGGS statistics.
Source code in vgrid/stats/dggridstats.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
digipininspect(resolution)
¶
Generate comprehensive inspection data for DIGIPIN DGGS cells at a given resolution.
This function creates a detailed analysis of DIGIPIN cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
DIGIPIN resolution level (1-10) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing DIGIPIN cell inspection data with columns: - digipin: DIGIPIN cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the Antimeridian - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness - cvh: Convex Hull compactness |
Source code in vgrid/stats/digipinstats.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
digipininspect_cli()
¶
Command-line interface for DIGIPIN cell inspection.
Source code in vgrid/stats/digipinstats.py
523 524 525 526 527 528 529 530 531 532 533 534 | |
digipinstats_cli()
¶
Command-line interface for generating DIGIPIN DGGS statistics.
Source code in vgrid/stats/digipinstats.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
easeinspect(resolution)
¶
Generate comprehensive inspection data for EASE-DGGS cells at a given resolution.
This function creates a detailed analysis of EASE cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
EASE-DGGS resolution level (0-6) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing EASE cell inspection data with columns: - ease: EASE cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/easestats.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
easeinspect_cli()
¶
Command-line interface for EASE cell inspection.
Source code in vgrid/stats/easestats.py
482 483 484 485 486 487 488 489 490 491 492 493 | |
easestats_cli()
¶
Command-line interface for generating EASE-DGGS statistics.
Source code in vgrid/stats/easestats.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
garsinspect(resolution)
¶
Generate comprehensive inspection data for GARS DGGS cells at a given resolution.
This function creates a detailed analysis of GARS cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
GARS resolution level (0-4) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing GARS cell inspection data with columns: - gars: GARS cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the Antimeridian - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/garsstats.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
garsinspect_cli()
¶
Command-line interface for GARS cell inspection.
Source code in vgrid/stats/garsstats.py
488 489 490 491 492 493 494 495 496 497 498 499 | |
garsstats_cli()
¶
Command-line interface for generating GARS DGGS statistics.
Source code in vgrid/stats/garsstats.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
geohashinspect(resolution)
¶
Generate comprehensive inspection data for Geohash DGGS cells at a given resolution.
This function creates a detailed analysis of Geohash cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Geohash resolution level (0-12) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing Geohash cell inspection data with columns: - geohash: Geohash cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the Antimeridian - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/geohashstats.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
geohashinspect_cli()
¶
Command-line interface for Geohash cell inspection.
Source code in vgrid/stats/geohashstats.py
494 495 496 497 498 499 500 501 502 503 504 505 | |
geohashstats_cli()
¶
Command-line interface for generating Geohash DGGS statistics.
Source code in vgrid/stats/geohashstats.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
georefinspect(resolution)
¶
Generate comprehensive inspection data for GEOREF DGGS cells at a given resolution.
This function creates a detailed analysis of GEOREF cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
GEOREF resolution level (0-10) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing GEOREF cell inspection data with columns: - georef: GEOREF cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the Antimeridian - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/georefstats.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | |
georefinspect_cli()
¶
Command-line interface for GEOREF cell inspection.
Source code in vgrid/stats/georefstats.py
495 496 497 498 499 500 501 502 503 504 505 506 | |
georefstats_cli()
¶
Command-line interface for generating GEOREF DGGS statistics.
Source code in vgrid/stats/georefstats.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
h3inspect(resolution, fix_antimeridian=None)
¶
Generate comprehensive inspection data for H3 DGGS cells at a given resolution.
This function creates a detailed analysis of H3 cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
H3 resolution level (0-15) |
required |
fix_antimeridian
|
None
|
Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none |
None
|
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing H3 cell inspection data with columns: - h3: H3 cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the Antimeridian - is_pentagon: Whether cell is a pentagon - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/h3stats.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | |
h3inspect_cli()
¶
Command-line interface for H3 cell inspection.
Source code in vgrid/stats/h3stats.py
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 | |
h3stats_cli()
¶
Command-line interface for generating H3 DGGS statistics.
Source code in vgrid/stats/h3stats.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
isea3hinspect(resolution, fix_antimeridian=None)
¶
Generate comprehensive inspection data for ISEA3H DGGS cells at a given resolution.
This function creates a detailed analysis of ISEA3H cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
ISEA3H resolution level (0-40) |
required |
fix_antimeridian
|
None
|
Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none |
None
|
Source code in vgrid/stats/isea3hstats.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
isea3hinspect_cli()
¶
Command-line interface for ISEA3H cell inspection.
Source code in vgrid/stats/isea3hstats.py
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | |
isea3hstats_cli()
¶
Command-line interface for generating ISEA3H DGGS statistics.
Source code in vgrid/stats/isea3hstats.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
isea4tinspect(resolution, fix_antimeridian=None)
¶
Generate comprehensive inspection data for ISEA4T DGGS cells at a given resolution.
This function creates a detailed analysis of ISEA4T cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
ISEA4T resolution level (0-15) |
required | |
fix_antimeridian
|
None
|
Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none |
None
|
Source code in vgrid/stats/isea4tstats.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
isea4tinspect_cli()
¶
Command-line interface for ISEA4T cell inspection.
-fix, --fix_antimeridian: Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none
Source code in vgrid/stats/isea4tstats.py
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 | |
isea4tstats_cli()
¶
Command-line interface for generating ISEA4T DGGS statistics.
Source code in vgrid/stats/isea4tstats.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
maidenheadinspect(resolution)
¶
Generate comprehensive inspection data for Maidenhead DGGS cells at a given resolution.
This function creates a detailed analysis of Maidenhead cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Maidenhead resolution level (1-4) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing Maidenhead cell inspection data with columns: - maidenhead: Maidenhead cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/maidenheadstats.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
maidenheadinspect_cli()
¶
Command-line interface for Maidenhead cell inspection.
Source code in vgrid/stats/maidenheadstats.py
504 505 506 507 508 509 510 511 512 513 514 515 | |
maidenheadstats_cli()
¶
Command-line interface for generating Maidenhead DGGS statistics.
Source code in vgrid/stats/maidenheadstats.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
mgrsstats_cli()
¶
Command-line interface for generating MGRS DGGS statistics.
Source code in vgrid/stats/mgrsstats.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
olcinspect(resolution)
¶
Generate comprehensive inspection data for OLC DGGS cells at a given resolution.
This function creates a detailed analysis of OLC cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
OLC resolution level (2-15) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing OLC cell inspection data with columns: - olc: OLC cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/olcstats.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
olcinspect_cli()
¶
Command-line interface for OLC cell inspection.
Source code in vgrid/stats/olcstats.py
482 483 484 485 486 487 488 489 490 491 492 493 | |
olcstats_cli()
¶
Command-line interface for generating OLC DGGS statistics.
Source code in vgrid/stats/olcstats.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
qtminspect(resolution)
¶
Generate comprehensive inspection data for QTM DGGS cells at a given resolution.
This function creates a detailed analysis of QTM cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
QTM resolution level (1-24) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing QTM cell inspection data with columns: - qtm: QTM cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/qtmstats.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
qtminspect_cli()
¶
Command-line interface for QTM cell inspection.
Source code in vgrid/stats/qtmstats.py
476 477 478 479 480 481 482 483 484 485 486 487 | |
qtmstats_cli()
¶
Command-line interface for generating QTM DGGS statistics.
Source code in vgrid/stats/qtmstats.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
quadkeyinspect(resolution)
¶
Generate comprehensive inspection data for Quadkey DGGS cells at a given resolution.
This function creates a detailed analysis of Quadkey cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Quadkey resolution level (0-29) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing Quadkey cell inspection data with columns: - quadkey: Quadkey cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/quadkeystats.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
quadkeyinspect_cli()
¶
Command-line interface for Quadkey cell inspection.
Source code in vgrid/stats/quadkeystats.py
489 490 491 492 493 494 495 496 497 498 499 500 | |
quadkeystats_cli()
¶
Command-line interface for generating Quadkey DGGS statistics.
Source code in vgrid/stats/quadkeystats.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
rhealpixinspect(resolution=0, fix_antimeridian=None)
¶
Generate comprehensive inspection data for rHEALPix DGGS cells at a given resolution.
This function creates a detailed analysis of rHEALPix cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
rHEALPix resolution level (0-15) |
0
|
fix_antimeridian
|
str
|
Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none |
None
|
Source code in vgrid/stats/rhealpixstats.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
rhealpixinspect_cli()
¶
Command-line interface for rHEALPix cell inspection.
Source code in vgrid/stats/rhealpixstats.py
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | |
rhealpixstats_cli()
¶
Command-line interface for generating rHEALPix DGGS statistics.
Source code in vgrid/stats/rhealpixstats.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
s2inspect(resolution, fix_antimeridian=None)
¶
Generate comprehensive inspection data for S2 DGGS cells at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
S2 resolution level (0-30) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing S2 cell inspection data with columns: - s2: S2 cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/s2stats.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |
s2inspect_cli()
¶
Command-line interface for S2 cell inspection. CLI options: -r, --resolution: S2 resolution level (0-30) -split, --split_antimeridian: Enable antimeridian splitting (default: enabled)
Source code in vgrid/stats/s2stats.py
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | |
s2stats_cli()
¶
Command-line interface for generating S2 DGGS statistics.
Source code in vgrid/stats/s2stats.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
tilecodeinspect(resolution)
¶
Generate comprehensive inspection data for Tilecode DGGS cells at a given resolution.
This function creates a detailed analysis of Tilecode cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Tilecode resolution level (0-29) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing Tilecode cell inspection data with columns: - tilecode: Tilecode cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/tilecodestats.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
tilecodeinspect_cli()
¶
Command-line interface for Tilecode cell inspection.
Source code in vgrid/stats/tilecodestats.py
492 493 494 495 496 497 498 499 500 501 502 503 | |
tilecodestats_cli()
¶
Command-line interface for generating Tilecode DGGS statistics.
Source code in vgrid/stats/tilecodestats.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
This module provides functions for generating statistics for H3 DGGS cells.
h3_compactness_cvh(h3_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for H3 cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/h3stats.py
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 | |
h3_compactness_cvh_hist(h3_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for H3 cells.
Source code in vgrid/stats/h3stats.py
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 | |
h3_compactness_ipq(h3_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for H3 cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of H3 cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.907 indicating more regular hexagons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
h3_gdf
|
GeoDataFrame
|
GeoDataFrame from h3inspect function |
required |
Source code in vgrid/stats/h3stats.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | |
h3_compactness_ipq_hist(h3_gdf)
¶
Plot histogram of IPQ compactness for H3 cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for H3 cells, helping to understand how close cells are to being regular hexagons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
h3_gdf
|
GeoDataFrame
|
GeoDataFrame from h3inspect function |
required |
Source code in vgrid/stats/h3stats.py
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | |
h3_metrics(resolution, unit='m')
¶
Return comprehensive metrics for a resolution including number of cells, average edge length, average area, and area extrema analysis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
H3 resolution (0-15) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
Dictionary containing all metrics for the resolution |
Source code in vgrid/stats/h3stats.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
h3_norm_area(h3_gdf, crs='proj=moll')
¶
Plot normalized area map for H3 cells.
This function creates a visualization showing how H3 cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
h3_gdf
|
GeoDataFrame
|
GeoDataFrame from h3inspect function |
required |
Source code in vgrid/stats/h3stats.py
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | |
h3_norm_area_hist(h3_gdf)
¶
Plot histogram of normalized area for H3 cells.
This function creates a histogram visualization showing the distribution of normalized areas for H3 cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
h3_gdf
|
GeoDataFrame
|
GeoDataFrame from h3inspect function |
required |
Source code in vgrid/stats/h3stats.py
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | |
h3inspect(resolution, fix_antimeridian=None)
¶
Generate comprehensive inspection data for H3 DGGS cells at a given resolution.
This function creates a detailed analysis of H3 cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
H3 resolution level (0-15) |
required |
fix_antimeridian
|
None
|
Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none |
None
|
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing H3 cell inspection data with columns: - h3: H3 cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the Antimeridian - is_pentagon: Whether cell is a pentagon - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/h3stats.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | |
h3inspect_cli()
¶
Command-line interface for H3 cell inspection.
Source code in vgrid/stats/h3stats.py
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 | |
h3stats(unit='m')
¶
Generate comprehensive statistics for H3 DGGS cells.
This function combines basic H3 statistics (number of cells, edge lengths, areas) with area extrema analysis (min/max areas and ratios).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing comprehensive H3 DGGS statistics with columns: - resolution: Resolution level (0-15) - number_of_cells: Number of cells at each resolution - avg_edge_len_{unit}: Average edge length in the given unit - avg_area_{unit}2: Average cell area in the squared unit - min_area_{unit}2: Minimum pentagon area - max_area_{unit}2: Maximum hexagon area - max_min_ratio: Ratio of max hexagon area to min pentagon area |
Source code in vgrid/stats/h3stats.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
h3stats_cli()
¶
Command-line interface for generating H3 DGGS statistics.
Source code in vgrid/stats/h3stats.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
This module provides functions for generating statistics for S2 DGGS cells.
s2_compactness_cvh(s2_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for H3 cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/s2stats.py
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | |
s2_compactness_cvh_hist(s2_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for S2 cells.
Source code in vgrid/stats/s2stats.py
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | |
s2_compactness_ipq(s2_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for S2 cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s2_gdf
|
GeoDataFrame
|
GeoDataFrame from s2inspect function |
required |
Source code in vgrid/stats/s2stats.py
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
s2_compactness_ipq_hist(s2_gdf)
¶
Plot histogram of IPQ compactness for S2 cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for S2 cells, helping to understand how close cells are to being regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s2_gdf
|
GeoDataFrame
|
GeoDataFrame from s2inspect function |
required |
Source code in vgrid/stats/s2stats.py
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | |
s2_metrics(resolution, unit='m')
¶
Calculate metrics for S2 DGGS cells at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Resolution level (0-30) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, edge_length_in_unit, cell_area_in_unit_squared) |
Source code in vgrid/stats/s2stats.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
s2_norm_area(s2_gdf, crs='proj=moll')
¶
Plot normalized area map for S2 cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s2_gdf
|
GeoDataFrame
|
GeoDataFrame from s2inspect function |
required |
Source code in vgrid/stats/s2stats.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
s2_norm_area_hist(s2_gdf)
¶
Plot histogram of normalized area for S2 cells.
This function creates a histogram visualization showing the distribution of normalized areas for S2 cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s2_gdf
|
GeoDataFrame
|
GeoDataFrame from s2inspect function |
required |
Source code in vgrid/stats/s2stats.py
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | |
s2inspect(resolution, fix_antimeridian=None)
¶
Generate comprehensive inspection data for S2 DGGS cells at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
S2 resolution level (0-30) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing S2 cell inspection data with columns: - s2: S2 cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/s2stats.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |
s2inspect_cli()
¶
Command-line interface for S2 cell inspection. CLI options: -r, --resolution: S2 resolution level (0-30) -split, --split_antimeridian: Enable antimeridian splitting (default: enabled)
Source code in vgrid/stats/s2stats.py
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | |
s2stats(unit='m')
¶
Generate statistics for S2 DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing S2 DGGS statistics with columns: - Resolution: Resolution level (0-30) - Number_of_Cells: Number of cells at each resolution - Avg_Edge_Length_{unit}: Average edge length in the given unit - Avg_Cell_Area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/s2stats.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
s2stats_cli()
¶
Command-line interface for generating S2 DGGS statistics.
Source code in vgrid/stats/s2stats.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
This module provides functions for generating statistics for A5 DGGS cells.
a5_compactness_cvh(a5_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for A5 cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/a5stats.py
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | |
a5_compactness_cvh_hist(a5_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for A5 cells.
Source code in vgrid/stats/a5stats.py
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | |
a5_compactness_ipq(a5_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for A5 cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of A5 cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.907 indicating more regular hexagons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a5_gdf
|
GeoDataFrame
|
GeoDataFrame from a5inspect function |
required |
Source code in vgrid/stats/a5stats.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | |
a5_compactness_ipq_hist(a5_gdf)
¶
Plot histogram of IPQ compactness for A5 cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for A5 cells, helping to understand how close cells are to being regular hexagons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a5_gdf
|
GeoDataFrame
|
GeoDataFrame from a5inspect function |
required |
Source code in vgrid/stats/a5stats.py
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | |
a5_metrics(resolution, unit='m')
¶
Calculate metrics for A5 DGGS cells at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Resolution level (0-29) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, edge_length_in_unit, cell_area_in_unit_squared) |
Source code in vgrid/stats/a5stats.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
a5_norm_area(a5_gdf, crs='proj=moll')
¶
Plot normalized area map for A5 cells.
This function creates a visualization showing how A5 cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a5_gdf
|
GeoDataFrame
|
GeoDataFrame from a5inspect function |
required |
Source code in vgrid/stats/a5stats.py
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | |
a5_norm_area_hist(a5_gdf)
¶
Plot histogram of normalized area for A5 cells.
This function creates a histogram visualization showing the distribution of normalized areas for A5 cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a5_gdf
|
GeoDataFrame
|
GeoDataFrame from a5inspect function |
required |
Source code in vgrid/stats/a5stats.py
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | |
a5inspect(resolution, options={'segments': 'auto'}, split_antimeridian=False)
¶
Generate comprehensive inspection data for A5 DGGS cells at a given resolution.
This function creates a detailed analysis of A5 cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
A5 resolution level (0-29) |
required |
options
|
Optional dictionary of options for grid generation |
{'segments': 'auto'}
|
|
split_antimeridian
|
bool
|
When True, apply antimeridian splitting to the resulting polygons. Defaults to False when None or omitted. |
False
|
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing A5 cell inspection data with columns: - a5: A5 cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the Antimeridian - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/a5stats.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | |
a5inspect_cli()
¶
Command-line interface for A5 cell inspection.
Source code in vgrid/stats/a5stats.py
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 | |
a5stats(unit='m')
¶
Generate statistics for A5 DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing A5 DGGS statistics with columns: - Resolution: Resolution level (0-29) - Number_of_Cells: Number of cells at each resolution - Avg_Edge_Length_{unit}: Average edge length in the given unit - CLS: Characteristic length scale in the given unit - Avg_Cell_Area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/a5stats.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
a5stats_cli()
¶
Command-line interface for generating A5 DGGS statistics.
Source code in vgrid/stats/a5stats.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
This module provides functions for generating statistics for rHEALPix DGGS cells.
rhealpix_compactness_cvh(rhealpix_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for A5 cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/rhealpixstats.py
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | |
rhealpix_compactness_cvh_hist(rhealpix_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for rHEALPix cells.
Source code in vgrid/stats/rhealpixstats.py
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 | |
rhealpix_compactness_ipq(rhealpix_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for rHEALPix cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of rHEALPix cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.907 indicating more regular hexagons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rhealpix_gdf
|
GeoDataFrame
|
GeoDataFrame from rhealpixinspect function |
required |
Source code in vgrid/stats/rhealpixstats.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
rhealpix_compactness_ipq_hist(rhealpix_gdf)
¶
Plot histogram of IPQ compactness for rHEALPix cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for rHEALPix cells, helping to understand how close cells are to being regular quadrilaterals.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rhealpix_gdf
|
GeoDataFrame
|
GeoDataFrame from rhealpixinspect function |
required |
Source code in vgrid/stats/rhealpixstats.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | |
rhealpix_metrics(resolution, unit='m')
¶
Calculate metrics for rHEALPix DGGS cells at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Resolution level (0-30) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, edge_length_in_unit, cell_area_in_unit_squared) |
Source code in vgrid/stats/rhealpixstats.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
rhealpix_norm_area(rhealpix_gdf, crs='proj=moll')
¶
Plot normalized area map for rHEALPix cells.
This function creates a visualization showing how rHEALPix cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rhealpix_gdf
|
GeoDataFrame
|
GeoDataFrame from rhealpixinspect function |
required |
Source code in vgrid/stats/rhealpixstats.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |
rhealpix_norm_area_hist(rhealpix_gdf)
¶
Plot histogram of normalized area for rHEALPix cells.
This function creates a histogram visualization showing the distribution of normalized areas for rHEALPix cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rhealpix_gdf
|
GeoDataFrame
|
GeoDataFrame from rhealpixinspect function |
required |
Source code in vgrid/stats/rhealpixstats.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |
rhealpixinspect(resolution=0, fix_antimeridian=None)
¶
Generate comprehensive inspection data for rHEALPix DGGS cells at a given resolution.
This function creates a detailed analysis of rHEALPix cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
rHEALPix resolution level (0-15) |
0
|
fix_antimeridian
|
str
|
Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none |
None
|
Source code in vgrid/stats/rhealpixstats.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
rhealpixinspect_cli()
¶
Command-line interface for rHEALPix cell inspection.
Source code in vgrid/stats/rhealpixstats.py
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | |
rhealpixstats(unit='m')
¶
Generate statistics for rHEALPix DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing rHEALPix DGGS statistics with columns: - Resolution: Resolution level (0-30) - Number_of_Cells: Number of cells at each resolution - Avg_Edge_Length_{unit}: Average edge length in the given unit - Avg_Cell_Area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/rhealpixstats.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
rhealpixstats_cli()
¶
Command-line interface for generating rHEALPix DGGS statistics.
Source code in vgrid/stats/rhealpixstats.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
This module provides functions for generating statistics for ISEA4T DGGS cells.
isea4t_compactness_cvh(isea4t_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for ISEA4T cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/isea4tstats.py
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | |
isea4t_compactness_cvh_hist(isea4t_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for ISEA4T cells.
Source code in vgrid/stats/isea4tstats.py
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | |
isea4t_compactness_ipq(isea4t_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for ISEA4T cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of ISEA4T cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.907 indicating more regular hexagons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
isea4t_gdf
|
GeoDataFrame
|
GeoDataFrame from isea4tinspect function |
required |
Source code in vgrid/stats/isea4tstats.py
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |
isea4t_compactness_ipq_hist(isea4t_gdf)
¶
Plot histogram of IPQ compactness for ISEA4T cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for ISEA4T cells, helping to understand how close cells are to being regular triangles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
isea4t_gdf
|
GeoDataFrame
|
GeoDataFrame from isea4tinspect function |
required |
Source code in vgrid/stats/isea4tstats.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | |
isea4t_metrics(resolution, unit='m')
¶
Calculate metrics for ISEA4T DGGS cells at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
Resolution level (0-39) |
required | |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, edge_length_in_unit, cell_area_in_unit_squared) |
Source code in vgrid/stats/isea4tstats.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
isea4t_norm_area(isea4t_gdf, crs='proj=moll', fix_antimeridian=None)
¶
Plot normalized area map for ISEA4T cells.
This function creates a visualization showing how ISEA4T cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
isea4t_gdf
|
GeoDataFrame
|
GeoDataFrame from isea4tinspect function |
required |
Source code in vgrid/stats/isea4tstats.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | |
isea4t_norm_area_hist(isea4t_gdf)
¶
Plot histogram of normalized area for ISEA4T cells.
This function creates a histogram visualization showing the distribution of normalized areas for ISEA4T cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
isea4t_gdf
|
GeoDataFrame
|
GeoDataFrame from isea4tinspect function |
required |
Source code in vgrid/stats/isea4tstats.py
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | |
isea4tinspect(resolution, fix_antimeridian=None)
¶
Generate comprehensive inspection data for ISEA4T DGGS cells at a given resolution.
This function creates a detailed analysis of ISEA4T cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
ISEA4T resolution level (0-15) |
required | |
fix_antimeridian
|
None
|
Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none |
None
|
Source code in vgrid/stats/isea4tstats.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
isea4tinspect_cli()
¶
Command-line interface for ISEA4T cell inspection.
-fix, --fix_antimeridian: Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none
Source code in vgrid/stats/isea4tstats.py
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 | |
isea4tstats(unit='m')
¶
Generate statistics for ISEA4T DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing ISEA4T DGGS statistics with columns: - Resolution: Resolution level (0-39) - Number_of_Cells: Number of cells at each resolution - Avg_Edge_Length_{unit}: Average edge length in the given unit - Avg_Cell_Area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/isea4tstats.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
isea4tstats_cli()
¶
Command-line interface for generating ISEA4T DGGS statistics.
Source code in vgrid/stats/isea4tstats.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
This module provides functions for generating statistics for ISEA3H DGGS cells.
isea3h_compactness_cvh(isea3h_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for ISEA3H cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/isea3hstats.py
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | |
isea3h_compactness_cvh_hist(isea3h_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for ISEA3H cells.
Source code in vgrid/stats/isea3hstats.py
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 | |
isea3h_compactness_ipq(isea3h_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for ISEA3H cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of ISEA3H cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.907 indicating more regular hexagons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
isea3h_gdf
|
GeoDataFrame
|
GeoDataFrame from isea3hinspect function |
required |
Source code in vgrid/stats/isea3hstats.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
isea3h_compactness_ipq_hist(isea3h_gdf)
¶
Plot histogram of IPQ compactness for ISEA3H cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for ISEA3H cells, helping to understand how close cells are to being regular hexagons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
isea3h_gdf
|
GeoDataFrame
|
GeoDataFrame from isea3hinspect function |
required |
Source code in vgrid/stats/isea3hstats.py
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | |
isea3h_metrics(resolution, unit='m')
¶
Calculate metrics for ISEA3H DGGS cells at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
Resolution level (0-40) |
required | |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, edge_length_in_unit, cell_area_in_unit_squared) |
Source code in vgrid/stats/isea3hstats.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
isea3h_norm_area(isea3h_gdf, crs='proj=moll')
¶
Plot normalized area map for ISEA3H cells.
This function creates a visualization showing how ISEA3H cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
isea3h_gdf
|
GeoDataFrame
|
GeoDataFrame from isea3hinspect function |
required |
Source code in vgrid/stats/isea3hstats.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | |
isea3h_norm_area_hist(isea3h_gdf)
¶
Plot histogram of normalized area for ISEA3H cells.
This function creates a histogram visualization showing the distribution of normalized areas for ISEA3H cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
isea3h_gdf
|
GeoDataFrame
|
GeoDataFrame from isea3hinspect function |
required |
Source code in vgrid/stats/isea3hstats.py
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
isea3hinspect(resolution, fix_antimeridian=None)
¶
Generate comprehensive inspection data for ISEA3H DGGS cells at a given resolution.
This function creates a detailed analysis of ISEA3H cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
ISEA3H resolution level (0-40) |
required |
fix_antimeridian
|
None
|
Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none |
None
|
Source code in vgrid/stats/isea3hstats.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
isea3hinspect_cli()
¶
Command-line interface for ISEA3H cell inspection.
Source code in vgrid/stats/isea3hstats.py
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | |
isea3hstats(unit='m')
¶
Generate statistics for ISEA3H DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing ISEA3H DGGS statistics with columns: - Resolution: Resolution level (0-40) - Number_of_Cells: Number of cells at each resolution - Avg_Edge_Length_{unit}: Average edge length in the given unit - Avg_Cell_Area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/isea3hstats.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
isea3hstats_cli()
¶
Command-line interface for generating ISEA3H DGGS statistics.
Source code in vgrid/stats/isea3hstats.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
This module provides functions for generating statistics for EASE-DGGS cells.
ease_compactness_cvh(ease_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for EASE cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/easestats.py
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | |
ease_compactness_cvh_hist(ease_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for EASE cells.
Source code in vgrid/stats/easestats.py
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
ease_compactness_ipq(ease_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for EASE cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of EASE cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.785 indicating more regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ease_gdf
|
GeoDataFrame
|
GeoDataFrame from easeinspect function |
required |
Source code in vgrid/stats/easestats.py
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | |
ease_compactness_ipq_hist(ease_gdf)
¶
Plot histogram of IPQ compactness for EASE cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for EASE cells, helping to understand how close cells are to being regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ease_gdf
|
GeoDataFrame
|
GeoDataFrame from easeinspect function |
required |
Source code in vgrid/stats/easestats.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | |
ease_metrics(resolution, unit='m')
¶
Calculate metrics for EASE-DGGS cells at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Resolution level (0-6) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, edge_length_in_unit, cell_area_in_unit_squared) |
Source code in vgrid/stats/easestats.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | |
ease_norm_area(ease_gdf, crs='proj=moll')
¶
Plot normalized area map for EASE cells.
This function creates a visualization showing how EASE cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ease_gdf
|
GeoDataFrame
|
GeoDataFrame from easeinspect function |
required |
Source code in vgrid/stats/easestats.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
ease_norm_area_hist(ease_gdf)
¶
Plot histogram of normalized area for EASE cells.
This function creates a histogram visualization showing the distribution of normalized areas for EASE cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ease_gdf
|
GeoDataFrame
|
GeoDataFrame from easeinspect function |
required |
Source code in vgrid/stats/easestats.py
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
easeinspect(resolution)
¶
Generate comprehensive inspection data for EASE-DGGS cells at a given resolution.
This function creates a detailed analysis of EASE cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
EASE-DGGS resolution level (0-6) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing EASE cell inspection data with columns: - ease: EASE cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/easestats.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
easeinspect_cli()
¶
Command-line interface for EASE cell inspection.
Source code in vgrid/stats/easestats.py
482 483 484 485 486 487 488 489 490 491 492 493 | |
easestats(unit='m')
¶
Generate statistics for EASE-DGGS cells. length unit is m, area unit is m2 Args: unit: 'm' or 'km' for length; area will be 'm^2' or 'km^2'
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing EASE-DGGS statistics with columns: - Resolution: Resolution level (0-6) - Number_of_Cells: Number of cells at each resolution - Avg_Edge_Length_{unit}: Average edge length in the given unit - Avg_Cell_Area_{unit}2: Average cell area in the squared unit - CLS_{unit}: Characteristic Length Scale in the given unit |
Source code in vgrid/stats/easestats.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
easestats_cli()
¶
Command-line interface for generating EASE-DGGS statistics.
Source code in vgrid/stats/easestats.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
This module provides lightweight wrappers for DGGAL using the external dgg CLI directly.
Per request, dggalstats simply returns the direct output from
dgg <dggs_type> level without computing any additional metrics.
dggal_compactness_cvh(dggs_type, dggal_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for DGGAL cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/dggalstats.py
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 | |
dggal_compactness_cvh_hist(dggs_type, dggal_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for DGGAL cells.
Source code in vgrid/stats/dggalstats.py
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | |
dggal_compactness_ipq(dggs_type, dggal_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for DGGAL cells (generic visualization).
Source code in vgrid/stats/dggalstats.py
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 | |
dggal_compactness_ipq_hist(dggs_type, dggal_gdf)
¶
Plot histogram of IPQ compactness for DGGAL cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for DGGAL cells, helping to understand how close cells are to being regular shapes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gdf
|
GeoDataFrame from dggalinspect function |
required | |
dggs_type
|
str
|
DGGS type name for labeling and determining ideal IPQ values |
required |
Source code in vgrid/stats/dggalstats.py
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | |
dggal_metrics(dggs_type, resolution, unit='m')
¶
Calculate metrics for DGGAL cells at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dggs_type
|
str
|
DGGS type supported by DGGAL (see vgrid.utils.constants.DGGAL_TYPES) |
required |
resolution
|
int
|
Resolution level (0-29) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, edge_length_in_unit, cell_area_in_unit_squared) |
Source code in vgrid/stats/dggalstats.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
dggal_norm_area_hist(dggs_type, dggal_gdf)
¶
Plot histogram of normalized area for DGGAL cells.
This function creates a histogram visualization showing the distribution of normalized areas for DGGAL cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gdf
|
GeoDataFrame from dggalinspect function |
required | |
dggs_type
|
str
|
DGGS type name for labeling |
required |
Source code in vgrid/stats/dggalstats.py
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | |
dggalinfo(dggs_type)
¶
Return the direct stdout from dgg <dggs_type> level.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dggs_type
|
str
|
DGGS type supported by DGGAL (see vgrid.utils.constants.dggs_type) |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
stdout string on success; None on failure. |
Source code in vgrid/stats/dggalstats.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
dggalinfo_cli()
¶
Command-line interface for generating DGGAL DGGS statistics.
Source code in vgrid/stats/dggalstats.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
dggalinspect(dggs_type, resolution, split_antimeridian=False)
¶
Generate detailed inspection data for a DGGAL DGGS type at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dggs_type
|
str
|
DGGS type supported by DGGAL |
required |
resolution
|
int
|
Resolution level |
required |
split_antimeridian
|
bool
|
When True, apply antimeridian splitting to the resulting polygons. Defaults to True when None or omitted. |
False
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
geopandas.GeoDataFrame with columns: - ZoneID (as provided by DGGAL output; no renaming is performed) - resolution - geometry - cell_area (m^2) - cell_perimeter (m) - crossed (bool) - norm_area (area/mean_area) - ipq (4πA/P²) - zsc (sqrt(4πA - A²/R²)/P), with R=WGS84 a |
Source code in vgrid/stats/dggalstats.py
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | |
dggalinspect_cli()
¶
Command-line interface for DGGAL cell inspection.
Source code in vgrid/stats/dggalstats.py
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 | |
dggalstats(dggs_type, unit='m')
¶
Compute and return a DataFrame of DGGAL metrics per resolution for the given type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dggs_type
|
str
|
DGGS type supported by DGGAL (see vgrid.utils.constants.DGGAL_TYPES) |
required |
unit
|
str
|
'm' or 'km' for length; area columns will reflect the squared unit |
'm'
|
Returns:
| Type | Description |
|---|---|
DataFrame | None
|
pandas DataFrame with columns for resolution, number of cells, average edge length, |
DataFrame | None
|
and average cell area in the requested units. |
Source code in vgrid/stats/dggalstats.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
dggalstats_cli()
¶
Command-line interface for generating DGGAL DGGS statistics.
Source code in vgrid/stats/dggalstats.py
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | |
DGGRID Statistics Module
This module provides functions to calculate and display statistics for DGGRID Discrete Global Grid System (DGGS) types. It supports both command-line interface and direct function calls.
Key Functions: - dggrid_stats: Calculate and display statistics for a given DGGRID DGGS type and resolution - dggridinspect: Generate detailed inspection data for a given DGGRID DGGS type and resolution - main: Command-line interface for dggrid_stats
dggrid_compactness_cvh(dggs_type='DGGRID', dggrid_gdf=None, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for DGGRID cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/dggridstats.py
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | |
dggrid_compactness_cvh_hist(dggs_type='DGGRID', dggrid_gdf=None)
¶
Plot histogram of CVH (cell area / convex hull area) for DGGRID cells.
Source code in vgrid/stats/dggridstats.py
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 | |
dggrid_compactness_ipq(dggs_type='DGGRID', dggrid_gdf=None, crs='proj=moll')
¶
Plot IPQ compactness map for DGGRID cells.
Source code in vgrid/stats/dggridstats.py
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
dggrid_compactness_ipq_hist(dggs_type='DGGRID', dggrid_gdf=None)
¶
Plot histogram of IPQ compactness for DGGRID cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for DGGRID cells, helping to understand how close cells are to being regular shapes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gdf
|
GeoDataFrame from dggridinspect function |
required | |
dggs_type
|
DGGS type name for labeling and determining ideal IPQ values |
'DGGRID'
|
Source code in vgrid/stats/dggridstats.py
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | |
dggrid_norm_area(dggs_type='DGGRID', dggrid_gdf=None, crs='proj=moll')
¶
Plot normalized area map for DGGRID cells.
Source code in vgrid/stats/dggridstats.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | |
dggrid_norm_area_hist(dggs_type='DGGRID', dggrid_gdf=None)
¶
Plot histogram of normalized area for DGGRID cells.
This function creates a histogram visualization showing the distribution of normalized areas for DGGRID cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gdf
|
GeoDataFrame from dggridinspect function |
required | |
dggs_type
|
DGGS type name for labeling |
'DGGRID'
|
Source code in vgrid/stats/dggridstats.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | |
dggridinspect(dggrid_instance, dggs_type, resolution, split_antimeridian=False, aggregate=False)
¶
Generate detailed inspection data for a DGGRID DGGS type at a given resolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dggrid_instance
|
DGGRID instance for grid operations |
required | |
dggs_type
|
str
|
DGGS type supported by DGGRID (see dggs_types) |
required |
resolution
|
int
|
Resolution level |
required |
split_antimeridian
|
bool
|
When True, apply antimeridian fixing to the resulting polygons. |
False
|
aggregate
|
bool
|
When True, aggregate the resulting polygons. Defaults to False to avoid aggregation by default. |
False
|
Source code in vgrid/stats/dggridstats.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
dggridinspect_cli()
¶
Command-line interface for DGGRID cell inspection.
Source code in vgrid/stats/dggridstats.py
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | |
dggridstats(dggrid_instance, dggs_type, unit='m')
¶
length unit is m, area unit is m2 Return a DataFrame of DGGRID stats per resolution.
'km' or 'm' for length columns; area is squared unit.
DGGRID native output is km^2 for area and km for CLS.
Source code in vgrid/stats/dggridstats.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
dggridstats_cli()
¶
Command-line interface for generating DGGAL DGGS statistics.
Source code in vgrid/stats/dggridstats.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
This module provides functions for generating statistics for QTM DGGS cells.
qtm_compactness_cvh(qtm_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for ISEA4T cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/qtmstats.py
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | |
qtm_compactness_cvh_hist(qtm_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for ISEA4T cells.
Source code in vgrid/stats/qtmstats.py
424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 | |
qtm_compactness_ipq(qtm_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for QTM cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of QTM cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.907 indicating more regular hexagons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qtm_gdf
|
GeoDataFrame
|
GeoDataFrame from qtminspect function |
required |
Source code in vgrid/stats/qtmstats.py
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | |
qtm_compactness_ipq_hist(qtm_gdf)
¶
Plot histogram of IPQ compactness for QTM cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for QTM cells, helping to understand how close cells are to being regular triangles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qtm_gdf
|
GeoDataFrame
|
GeoDataFrame from qtminspect function |
required |
Source code in vgrid/stats/qtmstats.py
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | |
qtm_metrics(resolution, unit='m')
¶
Calculate metrics for QTM DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Resolution level (1-24) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, avg_edge_len_in_unit, avg_cell_area_in_unit_squared) |
Source code in vgrid/stats/qtmstats.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
qtm_norm_area(qtm_gdf, crs='proj=moll')
¶
Plot normalized area map for QTM cells.
This function creates a visualization showing how QTM cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qtm_gdf
|
GeoDataFrame
|
GeoDataFrame from qtminspect function |
required |
Source code in vgrid/stats/qtmstats.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
qtm_norm_area_hist(qtm_gdf)
¶
Plot histogram of normalized area for QTM cells.
This function creates a histogram visualization showing the distribution of normalized areas for QTM cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qtm_gdf
|
GeoDataFrame
|
GeoDataFrame from qtminspect function |
required |
Source code in vgrid/stats/qtmstats.py
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | |
qtminspect(resolution)
¶
Generate comprehensive inspection data for QTM DGGS cells at a given resolution.
This function creates a detailed analysis of QTM cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
QTM resolution level (1-24) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing QTM cell inspection data with columns: - qtm: QTM cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/qtmstats.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
qtminspect_cli()
¶
Command-line interface for QTM cell inspection.
Source code in vgrid/stats/qtmstats.py
476 477 478 479 480 481 482 483 484 485 486 487 | |
qtmstats(unit='m')
¶
Generate statistics for QTM DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing QTM DGGS statistics with columns: - resolution: Resolution level (1-24) - number_of_cells: Number of cells at each resolution - avg_edge_len_{unit}: Average edge length in the given unit - avg_cell_area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/qtmstats.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
qtmstats_cli()
¶
Command-line interface for generating QTM DGGS statistics.
Source code in vgrid/stats/qtmstats.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
This module provides functions for generating statistics for OLC DGGS cells.
olc_compactness_cvh(olc_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for ISEA4T cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/olcstats.py
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | |
olc_compactness_cvh_hist(olc_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for ISEA4T cells.
Source code in vgrid/stats/olcstats.py
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
olc_compactness_ipq(olc_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for OLC cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of OLC cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.785 indicating more regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
olc_gdf
|
GeoDataFrame
|
GeoDataFrame from olcinspect function |
required |
Source code in vgrid/stats/olcstats.py
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | |
olc_compactness_ipq_hist(olc_gdf)
¶
Plot histogram of IPQ compactness for OLC cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for OLC cells, helping to understand how close cells are to being regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
olc_gdf
|
GeoDataFrame
|
GeoDataFrame from olcinspect function |
required |
Source code in vgrid/stats/olcstats.py
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | |
olc_metrics(resolution, unit='m')
¶
Calculate metrics for OLC DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Resolution level (0-15) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, avg_edge_len_in_unit, avg_cell_area_in_unit_squared) |
Source code in vgrid/stats/olcstats.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
olc_norm_area(olc_gdf, crs='proj=moll')
¶
Plot normalized area map for OLC cells.
This function creates a visualization showing how OLC cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
olc_gdf
|
GeoDataFrame
|
GeoDataFrame from olcinspect function |
required |
Source code in vgrid/stats/olcstats.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
olc_norm_area_hist(olc_gdf)
¶
Plot histogram of normalized area for OLC cells.
This function creates a histogram visualization showing the distribution of normalized areas for OLC cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
olc_gdf
|
GeoDataFrame
|
GeoDataFrame from olcinspect function |
required |
Source code in vgrid/stats/olcstats.py
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | |
olcinspect(resolution)
¶
Generate comprehensive inspection data for OLC DGGS cells at a given resolution.
This function creates a detailed analysis of OLC cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
OLC resolution level (2-15) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing OLC cell inspection data with columns: - olc: OLC cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/olcstats.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
olcinspect_cli()
¶
Command-line interface for OLC cell inspection.
Source code in vgrid/stats/olcstats.py
482 483 484 485 486 487 488 489 490 491 492 493 | |
olcstats(unit='m')
¶
Generate statistics for OLC DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing OLC DGGS statistics with columns: - resolution: Resolution level (2,4,6,8,10,11,12,13,14,15) - number_of_cells: Number of cells at each resolution - avg_edge_len_{unit}: Average edge length in the given unit - avg_cell_area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/olcstats.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
olcstats_cli()
¶
Command-line interface for generating OLC DGGS statistics.
Source code in vgrid/stats/olcstats.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
This module provides functions for generating statistics for Geohash DGGS cells.
geohash_compactness_cvh(geohash_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for Geohash cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/geohashstats.py
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | |
geohash_compactness_cvh_hist(geohash_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for Geohash cells.
Source code in vgrid/stats/geohashstats.py
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | |
geohash_compactness_ipq(geohash_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for Geohash cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of Geohash cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.785 indicating more regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geohash_gdf
|
GeoDataFrame
|
GeoDataFrame from geohashinspect function |
required |
Source code in vgrid/stats/geohashstats.py
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | |
geohash_compactness_ipq_hist(geohash_gdf)
¶
Plot histogram of IPQ compactness for Geohash cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for Geohash cells, helping to understand how close cells are to being regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geohash_gdf
|
GeoDataFrame
|
GeoDataFrame from geohashinspect function |
required |
Source code in vgrid/stats/geohashstats.py
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | |
geohash_metrics(resolution, unit='m')
¶
Calculate metrics for Geohash DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Resolution level (0-12) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, avg_edge_len_in_unit, avg_cell_area_in_unit_squared) |
Source code in vgrid/stats/geohashstats.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
geohash_norm_area(geohash_gdf, crs='proj=moll')
¶
Plot normalized area map for Geohash cells.
This function creates a visualization showing how Geohash cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geohash_gdf
|
GeoDataFrame
|
GeoDataFrame from geohashinspect function |
required |
Source code in vgrid/stats/geohashstats.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
geohash_norm_area_hist(geohash_gdf)
¶
Plot histogram of normalized area for Geohash cells.
This function creates a histogram visualization showing the distribution of normalized areas for Geohash cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geohash_gdf
|
GeoDataFrame
|
GeoDataFrame from geohashinspect function |
required |
Source code in vgrid/stats/geohashstats.py
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | |
geohashinspect(resolution)
¶
Generate comprehensive inspection data for Geohash DGGS cells at a given resolution.
This function creates a detailed analysis of Geohash cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Geohash resolution level (0-12) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing Geohash cell inspection data with columns: - geohash: Geohash cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the Antimeridian - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/geohashstats.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
geohashinspect_cli()
¶
Command-line interface for Geohash cell inspection.
Source code in vgrid/stats/geohashstats.py
494 495 496 497 498 499 500 501 502 503 504 505 | |
geohashstats(unit='m')
¶
Generate statistics for Geohash DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing Geohash DGGS statistics with columns: - resolution: Resolution level (0-12) - number_of_cells: Number of cells at each resolution - avg_edge_len_{unit}: Average edge length in the given unit - avg_cell_area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/geohashstats.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
geohashstats_cli()
¶
Command-line interface for generating Geohash DGGS statistics.
Source code in vgrid/stats/geohashstats.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
This module provides functions for generating statistics for GEOREF DGGS cells.
georef_compactness_cvh(georef_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for GEOREF cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/georefstats.py
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | |
georef_compactness_cvh_hist(georef_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for GEOREF cells.
Source code in vgrid/stats/georefstats.py
443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | |
georef_compactness_ipq(georef_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for GEOREF cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of GEOREF cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.785 indicating more regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
georef_gdf
|
GeoDataFrame
|
GeoDataFrame from georefinspect function |
required |
Source code in vgrid/stats/georefstats.py
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
georef_compactness_ipq_hist(georef_gdf)
¶
Plot histogram of IPQ compactness for GEOREF cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for GEOREF cells, helping to understand how close cells are to being regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
georef_gdf
|
GeoDataFrame
|
GeoDataFrame from georefinspect function |
required |
Source code in vgrid/stats/georefstats.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | |
georef_metrics(resolution, unit='m')
¶
Calculate metrics for GEOREF DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Resolution level (0-7) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, avg_edge_len_in_unit, avg_cell_area_in_unit_squared) |
Source code in vgrid/stats/georefstats.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
georef_norm_area(georef_gdf, crs='proj=moll')
¶
Plot normalized area map for GEOREF cells.
This function creates a visualization showing how GEOREF cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
georef_gdf
|
GeoDataFrame
|
GeoDataFrame from georefinspect function |
required |
Source code in vgrid/stats/georefstats.py
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
georef_norm_area_hist(georef_gdf)
¶
Plot histogram of normalized area for GEOREF cells.
This function creates a histogram visualization showing the distribution of normalized areas for GEOREF cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
georef_gdf
|
GeoDataFrame
|
GeoDataFrame from georefinspect function |
required |
Source code in vgrid/stats/georefstats.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |
georefinspect(resolution)
¶
Generate comprehensive inspection data for GEOREF DGGS cells at a given resolution.
This function creates a detailed analysis of GEOREF cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
GEOREF resolution level (0-10) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing GEOREF cell inspection data with columns: - georef: GEOREF cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the Antimeridian - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/georefstats.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | |
georefinspect_cli()
¶
Command-line interface for GEOREF cell inspection.
Source code in vgrid/stats/georefstats.py
495 496 497 498 499 500 501 502 503 504 505 506 | |
georefstats(unit='m')
¶
Generate statistics for GEOREF DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing GEOREF DGGS statistics with columns: - resolution: Resolution level (0-7) - number_of_cells: Number of cells at each resolution - avg_edge_len_{unit}: Average edge length in the given unit - avg_cell_area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/georefstats.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
georefstats_cli()
¶
Command-line interface for generating GEOREF DGGS statistics.
Source code in vgrid/stats/georefstats.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
This module provides functions for generating statistics for MGRS DGGS cells.
mgrs_metrics(resolution, unit='m')
¶
Calculate metrics for MGRS DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
Resolution level (0-5) |
required | |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, avg_edge_len_in_unit, avg_cell_area_in_unit_squared) |
Source code in vgrid/stats/mgrsstats.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
mgrsstats(unit='m')
¶
Generate statistics for MGRS DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing MGRS DGGS statistics with columns: - resolution: Resolution level (0-5) - number_of_cells: Number of cells at each resolution - avg_edge_len_{unit}: Average edge length in the given unit - avg_cell_area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/mgrsstats.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
mgrsstats_cli()
¶
Command-line interface for generating MGRS DGGS statistics.
Source code in vgrid/stats/mgrsstats.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
This module provides functions for generating statistics for Tilecode DGGS cells.
tilecode_compactness_cvh(tilecode_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for Tilecode cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/tilecodestats.py
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | |
tilecode_compactness_cvh_hist(tilecode_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for Tilecode cells.
Source code in vgrid/stats/tilecodestats.py
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 | |
tilecode_compactness_ipq(tilecode_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for Tilecode cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of Tilecode cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.785 indicating more regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tilecode_gdf
|
GeoDataFrame
|
GeoDataFrame from tilecodeinspect function |
required |
Source code in vgrid/stats/tilecodestats.py
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
tilecode_compactness_ipq_hist(tilecode_gdf)
¶
Plot histogram of IPQ compactness for Tilecode cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for Tilecode cells, helping to understand how close cells are to being regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tilecode_gdf
|
GeoDataFrame
|
GeoDataFrame from tilecodeinspect function |
required |
Source code in vgrid/stats/tilecodestats.py
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | |
tilecode_metrics(resolution, unit='m')
¶
Calculate metrics for Tilecode DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Resolution level (0-30) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, avg_edge_len_in_unit, avg_cell_area_in_unit_squared) |
Source code in vgrid/stats/tilecodestats.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
tilecode_norm_area(tilecode_gdf, crs='proj=moll')
¶
Plot normalized area map for Tilecode cells.
This function creates a visualization showing how Tilecode cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tilecode_gdf
|
GeoDataFrame
|
GeoDataFrame from tilecodeinspect function |
required |
Source code in vgrid/stats/tilecodestats.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | |
tilecode_norm_area_hist(tilecode_gdf)
¶
Plot histogram of normalized area for Tilecode cells.
This function creates a histogram visualization showing the distribution of normalized areas for Tilecode cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tilecode_gdf
|
GeoDataFrame
|
GeoDataFrame from tilecodeinspect function |
required |
Source code in vgrid/stats/tilecodestats.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | |
tilecodeinspect(resolution)
¶
Generate comprehensive inspection data for Tilecode DGGS cells at a given resolution.
This function creates a detailed analysis of Tilecode cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Tilecode resolution level (0-29) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing Tilecode cell inspection data with columns: - tilecode: Tilecode cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/tilecodestats.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
tilecodeinspect_cli()
¶
Command-line interface for Tilecode cell inspection.
Source code in vgrid/stats/tilecodestats.py
492 493 494 495 496 497 498 499 500 501 502 503 | |
tilecodestats(unit='m')
¶
Generate statistics for Tilecode DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing Tilecode DGGS statistics with columns: - resolution: Resolution level (0-30) - number_of_cells: Number of cells at each resolution - avg_edge_len_{unit}: Average edge length in the given unit - avg_cell_area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/tilecodestats.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
tilecodestats_cli()
¶
Command-line interface for generating Tilecode DGGS statistics.
Source code in vgrid/stats/tilecodestats.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
This module provides functions for generating statistics for Quadkey DGGS cells.
quadkey_compactness_cvh(quadkey_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for Quadkey cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/quadkeystats.py
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | |
quadkey_compactness_cvh_hist(quadkey_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for Quadkey cells.
Source code in vgrid/stats/quadkeystats.py
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | |
quadkey_compactness_ipq(quadkey_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for Quadkey cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of Quadkey cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.785 indicating more regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quadkey_gdf
|
GeoDataFrame
|
GeoDataFrame from quadkeyinspect function |
required |
Source code in vgrid/stats/quadkeystats.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | |
quadkey_compactness_ipq_hist(quadkey_gdf)
¶
Plot histogram of IPQ compactness for Quadkey cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for Quadkey cells, helping to understand how close cells are to being regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quadkey_gdf
|
GeoDataFrame
|
GeoDataFrame from quadkeyinspect function |
required |
Source code in vgrid/stats/quadkeystats.py
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
quadkey_metrics(resolution, unit='m')
¶
Calculate metrics for Quadkey DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Resolution level (0-30) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, avg_edge_len_in_unit, avg_cell_area_in_unit_squared) |
Source code in vgrid/stats/quadkeystats.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
quadkey_norm_area(quadkey_gdf, crs='proj=moll')
¶
Plot normalized area map for Quadkey cells.
This function creates a visualization showing how Quadkey cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quadkey_gdf
|
GeoDataFrame
|
GeoDataFrame from quadkeyinspect function |
required |
Source code in vgrid/stats/quadkeystats.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | |
quadkey_norm_area_hist(quadkey_gdf)
¶
Plot histogram of normalized area for Quadkey cells.
This function creates a histogram visualization showing the distribution of normalized areas for Quadkey cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quadkey_gdf
|
GeoDataFrame
|
GeoDataFrame from quadkeyinspect function |
required |
Source code in vgrid/stats/quadkeystats.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | |
quadkeyinspect(resolution)
¶
Generate comprehensive inspection data for Quadkey DGGS cells at a given resolution.
This function creates a detailed analysis of Quadkey cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Quadkey resolution level (0-29) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing Quadkey cell inspection data with columns: - quadkey: Quadkey cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/quadkeystats.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
quadkeyinspect_cli()
¶
Command-line interface for Quadkey cell inspection.
Source code in vgrid/stats/quadkeystats.py
489 490 491 492 493 494 495 496 497 498 499 500 | |
quadkeystats(unit='m')
¶
Generate statistics for Quadkey DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing Quadkey DGGS statistics with columns: - resolution: Resolution level (0-30) - number_of_cells: Number of cells at each resolution - avg_edge_len_{unit}: Average edge length in the given unit - avg_cell_area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/quadkeystats.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
quadkeystats_cli()
¶
Command-line interface for generating Quadkey DGGS statistics.
Source code in vgrid/stats/quadkeystats.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
This module provides functions for generating statistics for Maidenhead DGGS cells.
maidenhead_compactness_cvh(maidenhead_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for Maidenhead cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/maidenheadstats.py
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 | |
maidenhead_compactness_cvh_hist(maidenhead_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for Maidenhead cells.
Source code in vgrid/stats/maidenheadstats.py
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 | |
maidenhead_compactness_ipq(maidenhead_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for Maidenhead cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of Maidenhead cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.785 indicating more regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
maidenhead_gdf
|
GeoDataFrame
|
GeoDataFrame from maidenheadinspect function |
required |
Source code in vgrid/stats/maidenheadstats.py
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | |
maidenhead_compactness_ipq_hist(maidenhead_gdf)
¶
Plot histogram of IPQ compactness for Maidenhead cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for Maidenhead cells, helping to understand how close cells are to being regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
maidenhead_gdf
|
GeoDataFrame
|
GeoDataFrame from maidenheadinspect function |
required |
Source code in vgrid/stats/maidenheadstats.py
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | |
maidenhead_metrics(resolution, unit='m')
¶
Calculate metrics for Maidenhead DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
Resolution level (0-4) |
required | |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, avg_edge_len_in_unit, avg_cell_area_in_unit_squared) |
Source code in vgrid/stats/maidenheadstats.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
maidenhead_norm_area(maidenhead_gdf, crs='proj=moll')
¶
Plot normalized area map for Maidenhead cells.
This function creates a visualization showing how Maidenhead cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
maidenhead_gdf
|
GeoDataFrame
|
GeoDataFrame from maidenheadinspect function |
required |
Source code in vgrid/stats/maidenheadstats.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | |
maidenhead_norm_area_hist(maidenhead_gdf)
¶
Plot histogram of normalized area for Maidenhead cells.
This function creates a histogram visualization showing the distribution of normalized areas for Maidenhead cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
maidenhead_gdf
|
GeoDataFrame
|
GeoDataFrame from maidenheadinspect function |
required |
Source code in vgrid/stats/maidenheadstats.py
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | |
maidenheadinspect(resolution)
¶
Generate comprehensive inspection data for Maidenhead DGGS cells at a given resolution.
This function creates a detailed analysis of Maidenhead cells including area variations, compactness measures, and dateline crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Maidenhead resolution level (1-4) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing Maidenhead cell inspection data with columns: - maidenhead: Maidenhead cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the dateline - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/maidenheadstats.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
maidenheadinspect_cli()
¶
Command-line interface for Maidenhead cell inspection.
Source code in vgrid/stats/maidenheadstats.py
504 505 506 507 508 509 510 511 512 513 514 515 | |
maidenheadstats(unit='m')
¶
Generate statistics for Maidenhead DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing Maidenhead DGGS statistics with columns: - resolution: Resolution level (0-4) - number_of_cells: Number of cells at each resolution - avg_edge_len_{unit}: Average edge length in the given unit - avg_cell_area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/maidenheadstats.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
maidenheadstats_cli()
¶
Command-line interface for generating Maidenhead DGGS statistics.
Source code in vgrid/stats/maidenheadstats.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
This module provides functions for generating statistics for GARS DGGS cells.
gars_compactness_cvh(gars_gdf, crs='proj=moll')
¶
Plot CVH (cell area / convex hull area) compactness map for GARS cells.
Values are in (0, 1], with 1 indicating the most compact (convex) shape.
Source code in vgrid/stats/garsstats.py
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | |
gars_compactness_cvh_hist(gars_gdf)
¶
Plot histogram of CVH (cell area / convex hull area) for GARS cells.
Source code in vgrid/stats/garsstats.py
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | |
gars_compactness_ipq(gars_gdf, crs='proj=moll')
¶
Plot IPQ compactness map for GARS cells.
This function creates a visualization showing the Isoperimetric Quotient (IPQ) compactness of GARS cells across the globe. IPQ measures how close each cell is to being circular, with values closer to 0.785 indicating more regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gars_gdf
|
GeoDataFrame
|
GeoDataFrame from garsinspect function |
required |
Source code in vgrid/stats/garsstats.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | |
gars_compactness_ipq_hist(gars_gdf)
¶
Plot histogram of IPQ compactness for GARS cells.
This function creates a histogram visualization showing the distribution of Isoperimetric Quotient (IPQ) compactness values for GARS cells, helping to understand how close cells are to being regular squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gars_gdf
|
GeoDataFrame
|
GeoDataFrame from garsinspect function |
required |
Source code in vgrid/stats/garsstats.py
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | |
gars_metrics(resolution, unit='m')
¶
Calculate metrics for GARS DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
Resolution level (0-4) |
required |
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(num_cells, avg_edge_len_in_unit, avg_cell_area_in_unit_squared) |
Source code in vgrid/stats/garsstats.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
gars_norm_area(gars_gdf, crs='proj=moll')
¶
Plot normalized area map for GARS cells.
This function creates a visualization showing how GARS cell areas vary relative to the mean area across the globe, highlighting areas of distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gars_gdf
|
GeoDataFrame
|
GeoDataFrame from garsinspect function |
required |
Source code in vgrid/stats/garsstats.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | |
gars_norm_area_hist(gars_gdf)
¶
Plot histogram of normalized area for GARS cells.
This function creates a histogram visualization showing the distribution of normalized areas for GARS cells, helping to understand area variations and identify patterns in area distortion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gars_gdf
|
GeoDataFrame
|
GeoDataFrame from garsinspect function |
required |
Source code in vgrid/stats/garsstats.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | |
garsinspect(resolution)
¶
Generate comprehensive inspection data for GARS DGGS cells at a given resolution.
This function creates a detailed analysis of GARS cells including area variations, compactness measures, and Antimeridian crossing detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
int
|
GARS resolution level (0-4) |
required |
Returns:
| Type | Description |
|---|---|
|
geopandas.GeoDataFrame: DataFrame containing GARS cell inspection data with columns: - gars: GARS cell ID - resolution: Resolution level - geometry: Cell geometry - cell_area: Cell area in square meters - cell_perimeter: Cell perimeter in meters - crossed: Whether cell crosses the Antimeridian - norm_area: Normalized area (cell_area / mean_area) - ipq: Isoperimetric Quotient compactness - zsc: Zonal Standardized Compactness |
Source code in vgrid/stats/garsstats.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
garsinspect_cli()
¶
Command-line interface for GARS cell inspection.
Source code in vgrid/stats/garsstats.py
488 489 490 491 492 493 494 495 496 497 498 499 | |
garsstats(unit='m')
¶
Generate statistics for GARS DGGS cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unit
|
str
|
'm' or 'km' for length; area will be 'm^2' or 'km^2' |
'm'
|
Returns:
| Type | Description |
|---|---|
|
pandas.DataFrame: DataFrame containing GARS DGGS statistics with columns: - resolution: Resolution level (0-4) - number_of_cells: Number of cells at each resolution - avg_edge_len_{unit}: Average edge length in the given unit - avg_cell_area_{unit}2: Average cell area in the squared unit |
Source code in vgrid/stats/garsstats.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
garsstats_cli()
¶
Command-line interface for generating GARS DGGS statistics.
Source code in vgrid/stats/garsstats.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |