Giter VIP home page Giter VIP logo

mcat-hms's Introduction

mcat-hms

Contains the HEC-HMS model content and analysis tool (MCAT). Given a .hms file, this MCAT identifies paths to .control, .met, .basin, .grid, .dss, .sqlite, and .shp files and extracts the model's metadata.

The MCAT includes:

  • a standard set of methods to evaluate a model's content:
    • isamodel
    • modeltype
    • modelversion
    • index
    • isgeospatial
    • geospatialdata
  • an API for executing the above methods.
  • a docker container for running the methods and API.

Contents

  • /config: contains the data structure that holds the config information for the API.
  • /docs: contains the auto-generated swagger files.
  • /handlers: contains the handler function for each API endpoint.
  • /tools: the core code used to extract information from the various HEC-HMS files.
  • docker-compose.yml: options for building the dockerfile.
  • main.go : API Server.

Getting Started


  • Add a .env file to the root level of this directory with the following structure:
    AWS_ACCESS_KEY_ID='**************'
    AWS_SECRET_ACCESS_KEY='**************'
    AWS_DEFAULT_REGION='us-east-1'
    S3_BUCKET='******'
    
  • Run docker-compose up
  • To teardown, run docker-compose down

MCAT REST Specification


The following requests can be used to interrogate a model whose storage location is defined by the s3_key parameter:

GET /isamodel?definition_file=<s3_key>

GET /modeltype?definition_file=<s3_key>

GET /modelversion?definition_file=<s3_key>

GET /index?definition_file=<s3_key>

GET /isgeospatial?definition_file=<s3_key>

GET /geospatialdata?definition_file=<s3_key>

For example: http://mcat-hms:5900/isamodel?definition_file=models/hms/Truckee_River/Truckee_River.hms

Swagger Documentation:


To view docs goto: http://localhost:5900/swagger/index.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.