Skip to content

World-Meteorological-Organization/cap2geojson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple tool to convert CAP XML files into the GeoJSON format.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages