Skip to content

NJCoast/stormgrabber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stormgrabber

GoDoc Go Report Card

Tool to retrieve National Hurricane Center (NHC) RSS Feeds to get the current atlantic basin hurricane(s) trajectory for NJcoast and generate GeoJSON for input into NJcoast storm surge modeling computational code. Stormgrabber triggers a new calculation when forecast files have been changed by the NHC. The tool parses the rss feed for "Windfield" and "Best Track Points" rss tags for each active storm and then downloads the kmz file specified by the link target. This tool uses njcoast/kmz2geojson to convert the corresponding kmz to GeoJSON. Stormgrabber will only retreive storms that are in a bounding box surrounding the NJ coast that correspond to the valid spatial extent for NJcoast computational models. The tool utilizes Amazon AWS S3 buckets for storing the converted files and to give common access to the computational models. Amazon's AWS SDK for Go is used to provide that functionality. Stormgrabber uses the Go RSS feed library gofeed to manage parsing of the RSS xml file format. Geospatial 2D geometry support is provided by orb library.

Installation

The stormgrabber tool is designed to be run as a cron and deployed in a containerized environment. This repository contains a Dockerfile that can be used to build and deploy the tool using docker. To build the container:

docker build -t stormgrabber .

Development

Stormgrabber is written in go for deployment as a microservice. The file stormgrabber.go contains all of the code for the tool. Test driven development is used for development with the main unit tests contained in stormgrabber_test.go. Testing utilizes a sample NHC rss feed xml file example/gis-at.xml. Code documentation is autogenerated by the GoDoc documentation system.

Limitations

The rss feed tags utilized by the NHC are subject to possible change by the NHC which would result in the tool not downloading the appropriate kmz file. Code saves downloaded and converted files to AWS S3 storage and would have to be modified if moved to a different cloud provider service.

About

Utility to download storm best track KMZ file from NHC Atlantic Storm RSS Feed

Resources

License

Stars

Watchers

Forks

Packages

No packages published