stormgrabber

command module
v2.2.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

README

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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL