forge-py
The Footprint Generator project provides tools for generating geographic footprints from various data sources. This tool supports different generation strategies using open cv or alpha shape.
Installation
Using pip:
pip install forge-py
Using poetry:
poetry install
CLI Usage
forge-py -c configuration_file.cfg -g granule_file.nc
The forge-py command-line tool accepts the following options:
-
-c,--config: (Optional) Specifies the path to the configuration file. This file contains parameters for customizing the footprint generation process. -
-g,--granule: (Required) Specifies the path to the data granule file. This file contains the raw data used to generate the footprints.
Footprint Configuration
The configuration file specifies the parameters for generating footprints from various data sources, primarily using OpenCV and Alpha Shape algorithms.
Configuration Options
footprint
-
lonVar(string, required): Longitude variable in the dataset include group if in one. -
latVar(string, required): Latitude variable in the dataset include group if in one. -
is360(boolean, optional, default: False): Indicates if the data is in 360 format. -
strategy(optional, default: alpha_shape):open_cv: Uses OpenCV-based image processing techniques to extract footprints.alpha_shape: Employs the Alpha Shape algorithm to construct footprints from point data.
-
open_cv:pixel_height(int, optional, default: 1800): Desired pixel height for the input image.min_area(int, optional): Minimum area for polygons to be retained.fill_kernel(list of int, optional, default: None): Kernel size for filling holes in polygons.simplify(float, optional,): Controls the level of simplification applied to extracted polygons.fill_value(float, optional, default: np.nan): Fill value in the latitude, longitude arrays.
-
alpha_shape:alpha(float, optional, default: 0.05): Alpha value for the Alpha Shape algorithm, affecting the shape of polygons.thinning(dic, optional):method(string): Thinning method to apply to the Alpha Shape.value(list of float or float): Thinning parameters.
cutoff_lat(int, optional): Latitude cutoff for smoothing.min_area(int, optional): Minimum area for polygons to be retained.smooth_poles(list of int, optional): Latitude range for smoothing near poles.simplify(float, optional): Controls the level of simplification applied to extracted polygons.fill_value(float, optional, default: np.nan): Fill value in the latitude, longitude arrays.
Example Configuration
{
"latVar":"group1/group2/lat",
"lonVar":"group1/group2/lon",
"timeVar":"time",
"is360":false,
"footprint":{
"strategy": "open_cv",
"open_cv": {
"pixel_height": 1000,
"simplify":0.3,
"min_area": 30,
"fill_value": -99999.0,
"fill_kernel": [30,30]
},
"alpha_shape": {
"alpha":0.2,
"thinning": {"method": "bin_avg", "value": [0.5, 0.5]},
"cutoff_lat": 80,
"smooth_poles": [78,80],
"simplify" : 0.3,
"min_area": 30,
"fill_value": -99999.0
}
}
}
Metadata
Release files for forge-py 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| forge_py-0.4.0.tar.gz | 21.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| forge_py-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.0 kB
Release files / forge_py-0.4.0.tar.gz
| Download URL | forge_py-0.4.0.tar.gz |
|---|---|
| Size | 21.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57febbd397ad86903e353f1e09482dd2692ebfd434936b3bca5da0227b7fed41
|
|
BLAKE2b-256 checksum How to use checksums |
42d09d9bf3009af77e4a8d5b71cb6b2b88d729faf0f5a3c5599b344460378c1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.11.11 Linux/6.8.0-1020-azure
|
Release files / forge_py-0.4.0-py3-none-any.whl
| Download URL | forge_py-0.4.0-py3-none-any.whl |
|---|---|
| Size | 26.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0feba5398ec91985eda922eaec20f43c183cbf45809b2a7fb8e81959f851400c
|
|
BLAKE2b-256 checksum How to use checksums |
6ee5d5311d9d6fab37e6b7a36c995fcd762637a2ffd2fb45c07cb0c0cf6c64f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.11.11 Linux/6.8.0-1020-azure
|