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': 100}, 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': 100}
|
|
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
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 | |
a5inspect_cli()
¶
Command-line interface for A5 cell inspection.
Source code in vgrid/stats/a5stats.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 | |
a5stats_cli()
¶
Command-line interface for generating A5 DGGS statistics.
Source code in vgrid/stats/a5stats.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
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
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 351 352 353 354 355 356 357 358 359 | |
dggalinspect_cli()
¶
Command-line interface for DGGAL cell inspection.
Source code in vgrid/stats/dggalstats.py
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 | |
dggalstats_cli()
¶
Command-line interface for generating DGGAL DGGS statistics.
Source code in vgrid/stats/dggalstats.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
dggridinspect(dggrid_instance, dggs_type, resolution, split_antimeridian=False, aggregate=False, options={'densification': 30})
¶
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
|
options
|
dict
|
Options to pass to grid_cell_polygons_for_extent. For example: {"densification": 2} to add densification points. Defaults to None. |
{'densification': 30}
|
Source code in vgrid/stats/dggridstats.py
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 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | |
dggridinspect_cli()
¶
Command-line interface for DGGRID cell inspection.
Source code in vgrid/stats/dggridstats.py
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 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 612 613 614 615 616 617 | |
dggridstats_cli()
¶
Command-line interface for generating DGGAL DGGS statistics.
Source code in vgrid/stats/dggridstats.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
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
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 215 216 217 218 | |
digipininspect_cli()
¶
Command-line interface for DIGIPIN cell inspection.
Source code in vgrid/stats/digipinstats.py
534 535 536 537 538 539 540 541 542 543 544 545 | |
digipinstats_cli()
¶
Command-line interface for generating DIGIPIN DGGS statistics.
Source code in vgrid/stats/digipinstats.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
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
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 | |
easeinspect_cli()
¶
Command-line interface for EASE cell inspection.
Source code in vgrid/stats/easestats.py
495 496 497 498 499 500 501 502 503 504 505 506 | |
easestats_cli()
¶
Command-line interface for generating EASE-DGGS statistics.
Source code in vgrid/stats/easestats.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
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
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 | |
garsinspect_cli()
¶
Command-line interface for GARS cell inspection.
Source code in vgrid/stats/garsstats.py
499 500 501 502 503 504 505 506 507 508 509 510 | |
garsstats_cli()
¶
Command-line interface for generating GARS DGGS statistics.
Source code in vgrid/stats/garsstats.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
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
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 | |
geohashinspect_cli()
¶
Command-line interface for Geohash cell inspection.
Source code in vgrid/stats/geohashstats.py
505 506 507 508 509 510 511 512 513 514 515 516 | |
geohashstats_cli()
¶
Command-line interface for generating Geohash DGGS statistics.
Source code in vgrid/stats/geohashstats.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
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
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 | |
georefinspect_cli()
¶
Command-line interface for GEOREF cell inspection.
Source code in vgrid/stats/georefstats.py
506 507 508 509 510 511 512 513 514 515 516 517 | |
georefstats_cli()
¶
Command-line interface for generating GEOREF DGGS statistics.
Source code in vgrid/stats/georefstats.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
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
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 253 254 255 256 257 258 259 260 261 262 263 264 | |
h3inspect_cli()
¶
Command-line interface for H3 cell inspection.
Source code in vgrid/stats/h3stats.py
572 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 | |
h3stats_cli()
¶
Command-line interface for generating H3 DGGS statistics.
Source code in vgrid/stats/h3stats.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |
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
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 | |
isea3hinspect_cli()
¶
Command-line interface for ISEA3H cell inspection.
Source code in vgrid/stats/isea3hstats.py
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | |
isea3hstats_cli()
¶
Command-line interface for generating ISEA3H DGGS statistics.
Source code in vgrid/stats/isea3hstats.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
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
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 | |
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
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 | |
isea4tstats_cli()
¶
Command-line interface for generating ISEA4T DGGS statistics.
Source code in vgrid/stats/isea4tstats.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
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
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 | |
maidenheadinspect_cli()
¶
Command-line interface for Maidenhead cell inspection.
Source code in vgrid/stats/maidenheadstats.py
515 516 517 518 519 520 521 522 523 524 525 526 | |
maidenheadstats_cli()
¶
Command-line interface for generating Maidenhead DGGS statistics.
Source code in vgrid/stats/maidenheadstats.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
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
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 | |
olcinspect_cli()
¶
Command-line interface for OLC cell inspection.
Source code in vgrid/stats/olcstats.py
493 494 495 496 497 498 499 500 501 502 503 504 | |
olcstats_cli()
¶
Command-line interface for generating OLC DGGS statistics.
Source code in vgrid/stats/olcstats.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
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
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 | |
qtminspect_cli()
¶
Command-line interface for QTM cell inspection.
Source code in vgrid/stats/qtmstats.py
488 489 490 491 492 493 494 495 496 497 498 499 | |
qtmstats_cli()
¶
Command-line interface for generating QTM DGGS statistics.
Source code in vgrid/stats/qtmstats.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
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
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 | |
quadkeyinspect_cli()
¶
Command-line interface for Quadkey cell inspection.
Source code in vgrid/stats/quadkeystats.py
500 501 502 503 504 505 506 507 508 509 510 511 | |
quadkeystats_cli()
¶
Command-line interface for generating Quadkey DGGS statistics.
Source code in vgrid/stats/quadkeystats.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
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
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 | |
rhealpixinspect_cli()
¶
Command-line interface for rHEALPix cell inspection.
Source code in vgrid/stats/rhealpixstats.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 | |
rhealpixstats_cli()
¶
Command-line interface for generating rHEALPix DGGS statistics.
Source code in vgrid/stats/rhealpixstats.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
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
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 | |
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
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 506 507 | |
s2stats_cli()
¶
Command-line interface for generating S2 DGGS statistics.
Source code in vgrid/stats/s2stats.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
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
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 | |
tilecodeinspect_cli()
¶
Command-line interface for Tilecode cell inspection.
Source code in vgrid/stats/tilecodestats.py
503 504 505 506 507 508 509 510 511 512 513 514 | |
tilecodestats_cli()
¶
Command-line interface for generating Tilecode DGGS statistics.
Source code in vgrid/stats/tilecodestats.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 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
482 483 484 485 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 | |
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
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 | |
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
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 | |
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
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 468 469 470 471 472 473 474 475 476 477 478 479 | |
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
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 108 109 110 111 112 113 114 | |
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
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 | |
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
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 410 411 412 413 414 415 416 417 | |
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
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 253 254 255 256 257 258 259 260 261 262 263 264 | |
h3inspect_cli()
¶
Command-line interface for H3 cell inspection.
Source code in vgrid/stats/h3stats.py
572 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 | |
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
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 | |
h3stats_cli()
¶
Command-line interface for generating H3 DGGS statistics.
Source code in vgrid/stats/h3stats.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |
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
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 | |
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
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 474 475 476 477 | |
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
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 | |
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
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 384 385 386 387 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 506 507 | |
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
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 114 | |
s2stats_cli()
¶
Command-line interface for generating S2 DGGS statistics.
Source code in vgrid/stats/s2stats.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
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
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 | |
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
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 494 495 496 497 | |
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
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 | |
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
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 406 407 | |
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
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 | |
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
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 | |
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
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 299 300 301 302 303 | |
a5inspect(resolution, options={'segments': 100}, 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': 100}
|
|
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
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 | |
a5inspect_cli()
¶
Command-line interface for A5 cell inspection.
Source code in vgrid/stats/a5stats.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 | |
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
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 114 115 116 117 | |
a5stats_cli()
¶
Command-line interface for generating A5 DGGS statistics.
Source code in vgrid/stats/a5stats.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
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
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 | |
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
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 502 503 504 505 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 351 | |
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
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 | |
rhealpixinspect_cli()
¶
Command-line interface for rHEALPix cell inspection.
Source code in vgrid/stats/rhealpixstats.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 | |
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
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 114 | |
rhealpixstats_cli()
¶
Command-line interface for generating rHEALPix DGGS statistics.
Source code in vgrid/stats/rhealpixstats.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
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
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 | |
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
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 502 503 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 305 306 307 308 309 310 | |
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
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 | |
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
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 | |
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
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 | |
isea4tstats_cli()
¶
Command-line interface for generating ISEA4T DGGS statistics.
Source code in vgrid/stats/isea4tstats.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 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
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 | |
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
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 502 503 504 505 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 351 352 | |
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
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 | |
isea3hinspect_cli()
¶
Command-line interface for ISEA3H cell inspection.
Source code in vgrid/stats/isea3hstats.py
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | |
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
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 114 115 116 117 118 | |
isea3hstats_cli()
¶
Command-line interface for generating ISEA3H DGGS statistics.
Source code in vgrid/stats/isea3hstats.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
easeinspect_cli()
¶
Command-line interface for EASE cell inspection.
Source code in vgrid/stats/easestats.py
495 496 497 498 499 500 501 502 503 504 505 506 | |
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
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 | |
easestats_cli()
¶
Command-line interface for generating EASE-DGGS statistics.
Source code in vgrid/stats/easestats.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
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
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 612 613 614 615 616 617 618 619 620 | |
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
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 662 663 664 665 666 667 668 669 670 | |
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
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 502 503 504 505 506 | |
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
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 571 572 573 574 575 576 577 578 579 | |
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
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 | |
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
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 416 417 418 419 420 421 422 423 424 | |
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
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 | |
dggalinfo_cli()
¶
Command-line interface for generating DGGAL DGGS statistics.
Source code in vgrid/stats/dggalstats.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
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
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 351 352 353 354 355 356 357 358 359 | |
dggalinspect_cli()
¶
Command-line interface for DGGAL cell inspection.
Source code in vgrid/stats/dggalstats.py
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 | |
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
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 | |
dggalstats_cli()
¶
Command-line interface for generating DGGAL DGGS statistics.
Source code in vgrid/stats/dggalstats.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
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
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 | |
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
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 | |
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
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 | |
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
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 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | |
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
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 | |
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
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 376 377 378 379 380 381 382 383 | |
dggridinspect(dggrid_instance, dggs_type, resolution, split_antimeridian=False, aggregate=False, options={'densification': 30})
¶
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
|
options
|
dict
|
Options to pass to grid_cell_polygons_for_extent. For example: {"densification": 2} to add densification points. Defaults to None. |
{'densification': 30}
|
Source code in vgrid/stats/dggridstats.py
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 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | |
dggridinspect_cli()
¶
Command-line interface for DGGRID cell inspection.
Source code in vgrid/stats/dggridstats.py
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 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 612 613 614 615 616 617 | |
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
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 | |
dggridstats_cli()
¶
Command-line interface for generating DGGAL DGGS statistics.
Source code in vgrid/stats/dggridstats.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
qtminspect_cli()
¶
Command-line interface for QTM cell inspection.
Source code in vgrid/stats/qtmstats.py
488 489 490 491 492 493 494 495 496 497 498 499 | |
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
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 | |
qtmstats_cli()
¶
Command-line interface for generating QTM DGGS statistics.
Source code in vgrid/stats/qtmstats.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
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
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 | |
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
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 490 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
olcinspect_cli()
¶
Command-line interface for OLC cell inspection.
Source code in vgrid/stats/olcstats.py
493 494 495 496 497 498 499 500 501 502 503 504 | |
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
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 114 | |
olcstats_cli()
¶
Command-line interface for generating OLC DGGS statistics.
Source code in vgrid/stats/olcstats.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
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
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 | |
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
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 502 | |
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
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 | |
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
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 410 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
geohashinspect_cli()
¶
Command-line interface for Geohash cell inspection.
Source code in vgrid/stats/geohashstats.py
505 506 507 508 509 510 511 512 513 514 515 516 | |
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
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 | |
geohashstats_cli()
¶
Command-line interface for generating Geohash DGGS statistics.
Source code in vgrid/stats/geohashstats.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 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
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 | |
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
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 502 503 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
georefinspect_cli()
¶
Command-line interface for GEOREF cell inspection.
Source code in vgrid/stats/georefstats.py
506 507 508 509 510 511 512 513 514 515 516 517 | |
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
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 114 115 116 117 118 119 | |
georefstats_cli()
¶
Command-line interface for generating GEOREF DGGS statistics.
Source code in vgrid/stats/georefstats.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
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
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 | |
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
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 494 495 496 497 498 499 500 | |
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
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 | |
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
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 406 407 408 | |
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
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 | |
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
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 | |
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
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 299 300 301 | |
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
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 | |
tilecodeinspect_cli()
¶
Command-line interface for Tilecode cell inspection.
Source code in vgrid/stats/tilecodestats.py
503 504 505 506 507 508 509 510 511 512 513 514 | |
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
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 | |
tilecodestats_cli()
¶
Command-line interface for generating Tilecode DGGS statistics.
Source code in vgrid/stats/tilecodestats.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 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
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 | |
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
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 494 495 496 497 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
quadkeyinspect_cli()
¶
Command-line interface for Quadkey cell inspection.
Source code in vgrid/stats/quadkeystats.py
500 501 502 503 504 505 506 507 508 509 510 511 | |
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
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 | |
quadkeystats_cli()
¶
Command-line interface for generating Quadkey DGGS statistics.
Source code in vgrid/stats/quadkeystats.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 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
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 | |
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
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 502 503 504 505 506 507 508 509 510 511 512 | |
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
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 | |
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
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 416 417 418 419 420 | |
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
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 | |
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
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 | |
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
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 305 306 307 308 309 310 311 312 313 314 315 | |
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
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 | |
maidenheadinspect_cli()
¶
Command-line interface for Maidenhead cell inspection.
Source code in vgrid/stats/maidenheadstats.py
515 516 517 518 519 520 521 522 523 524 525 526 | |
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
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 114 115 116 117 118 119 120 | |
maidenheadstats_cli()
¶
Command-line interface for generating Maidenhead DGGS statistics.
Source code in vgrid/stats/maidenheadstats.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
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
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 | |
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
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 494 495 496 | |
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
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 | |
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
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 406 | |
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
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 | |
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
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 | |
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
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 | |
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
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 | |
garsinspect_cli()
¶
Command-line interface for GARS cell inspection.
Source code in vgrid/stats/garsstats.py
499 500 501 502 503 504 505 506 507 508 509 510 | |
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
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 114 115 116 | |
garsstats_cli()
¶
Command-line interface for generating GARS DGGS statistics.
Source code in vgrid/stats/garsstats.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |