Skip to main content

Python package to convert a CAP XML file into a GeoJSON.

Project description

The CAP to GeoJSON Converter

The Python package for making CAP alerts visualizable

License Badge Super-Linter Unit-Tests Publish-To-PyPI

Features

Getting Started

1. Installation

pip install cap2geojson

2A. Using the API

We can convert the CAP XML to GeoJSON using the transform(cap) method:

  • cap: The CAP alert XML string contents.
from cap2geojson import transform

with open(<cap-alert-directory>, 'r') as f:
    cap = f.read()

result = transform(cap)

2B. Using the CLI

We can convert a CAP alert directly to a GeoJSON file using the following command:

cap2geojson transform <cap-alert-directory>

Bugs and Issues

All bugs, enhancements and issues are managed on GitHub.

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cap2geojson-0.1.0.dev1.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

cap2geojson-0.1.0.dev1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file cap2geojson-0.1.0.dev1.tar.gz.

File metadata

  • Download URL: cap2geojson-0.1.0.dev1.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for cap2geojson-0.1.0.dev1.tar.gz
Algorithm Hash digest
SHA256 acdf3e48d498fb8ad2806d926e7c94f48648b9c8bf23df04f2b2cfdb14c89f97
MD5 62244c683128370a0fc06316e98a8198
BLAKE2b-256 9a720ee73b9a6e7e5daa92b2541e43befa00d24bc59d4027e49d2d7e5486ff06

See more details on using hashes here.

File details

Details for the file cap2geojson-0.1.0.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for cap2geojson-0.1.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 3df74c880054376b1ee43c3799f994b7bd9e409722ee5d9956f136b16eeb4094
MD5 c260cf89a82ec5e1d44e56ec352c3034
BLAKE2b-256 d3b8532c168383ebae37bdbd81ded71d46d78646d6649e69cdb399c091ec7349

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page