A parser to convert WAFS IWXXM SIGWX XML files into GeoJSON FeatureCollections.
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
sigwx-parser
A Python parser for converting WAFS IWXXM SIGWX XML files into GeoJSON FeatureCollections.
SIGWX (Significant Weather) charts are issued by the World Area Forecast System (WAFS) and contain information about meteorological hazards for aviation — things like icing, turbulence, jet streams, and tropical cyclones. This library parses the IWXXM XML format of those files and outputs structured GeoJSON that's easy to work with.
Installation
pip install sigwx-parser
Usage
from sigwx_parser import SigwxParser
# From a file
parser = SigwxParser(file_path="sigwx_output.xml")
# From a raw XML string
parser = SigwxParser(file_path=None, xml_content=xml_string)
forecasts = parser.parse()
Each item in the returned list corresponds to a forecast block in the XML:
[
{
"valid_time": "2024-02-22T12:00:00Z",
"issue_time": "2024-02-21T18:00:00Z",
"feature_collection": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [ [ [lon, lat], ... ] ]
},
"properties": {
"feature_id": "uuid.12345...",
"phenomenon": "AIRFRAME_ICING",
"upper_fl": "240",
"lower_fl": "100"
}
}
]
}
}
]
Excluding feature types
You can skip specific phenomenon types by passing an exclude set to parse():
forecasts = parser.parse(exclude={"CLOUD", "RADIATION"})
Valid values for exclude:
| Value | Description |
|---|---|
AIRFRAME_ICING |
Airframe icing areas |
CLOUD |
Significant cloud (e.g. CB, TCU) |
JETSTREAM |
Jet stream axes |
TROPOPAUSE |
Tropopause height |
TURBULENCE |
Turbulence areas |
RADIATION |
Radiation hazards |
TROPICAL_CYCLONE |
Tropical cyclone positions |
VOLCANO |
Volcanic ash areas |
Notes
- Polygon winding order is corrected automatically using Shapely.
- Geometries that cross the antimeridian are split correctly using the antimeridian library.
- Namespaces are stripped from the XML before parsing, so the XPath queries stay clean.
Dependencies
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sigwx_parser-1.0.2.tar.gz.
File metadata
- Download URL: sigwx_parser-1.0.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49fa3501b734c64c8ebeae75c02062f9cf5eb705a65fdce9648c3db54035b441
|
|
| MD5 |
2251b315c0b234fd0802a351745072fa
|
|
| BLAKE2b-256 |
3310a8baa519ed98f6def5fe44024df2d0f9e68236da06e2eabe312edeb165c6
|
Provenance
The following attestation bundles were made for sigwx_parser-1.0.2.tar.gz:
Publisher:
publish.yml on miguel-pub/sigwx-parser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sigwx_parser-1.0.2.tar.gz -
Subject digest:
49fa3501b734c64c8ebeae75c02062f9cf5eb705a65fdce9648c3db54035b441 - Sigstore transparency entry: 976498081
- Sigstore integration time:
-
Permalink:
miguel-pub/sigwx-parser@ccbbb96a5a65783a0030a5004a3c665a88fb0bff -
Branch / Tag:
refs/heads/master - Owner: https://github.com/miguel-pub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ccbbb96a5a65783a0030a5004a3c665a88fb0bff -
Trigger Event:
push
-
Statement type:
File details
Details for the file sigwx_parser-1.0.2-py3-none-any.whl.
File metadata
- Download URL: sigwx_parser-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d768260b3affe93164c89016ac2dd36086441c8432aefaa4f5ee29036dbdda35
|
|
| MD5 |
63032edf6c8fef487540fc4e6d196b55
|
|
| BLAKE2b-256 |
9c29e20f1b0e880ff4b0509b489b362df27e15e2dc5677c36f51c83dbda3fecd
|
Provenance
The following attestation bundles were made for sigwx_parser-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on miguel-pub/sigwx-parser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sigwx_parser-1.0.2-py3-none-any.whl -
Subject digest:
d768260b3affe93164c89016ac2dd36086441c8432aefaa4f5ee29036dbdda35 - Sigstore transparency entry: 976498082
- Sigstore integration time:
-
Permalink:
miguel-pub/sigwx-parser@ccbbb96a5a65783a0030a5004a3c665a88fb0bff -
Branch / Tag:
refs/heads/master - Owner: https://github.com/miguel-pub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ccbbb96a5a65783a0030a5004a3c665a88fb0bff -
Trigger Event:
push
-
Statement type: