Skip to content
forked from USACE/mcat-ras

HEC-RAS Model Content and Analysis Tool (MCAT)

License

Notifications You must be signed in to change notification settings

Dewberry/mcat-ras

This branch is 175 commits ahead of USACE/mcat-ras:main.

Folders and files

NameName
Last commit message
Last commit date
Jun 22, 2022
Jun 22, 2022
Jan 29, 2021
Jun 19, 2023
Mar 8, 2022
Jun 19, 2023
Jun 23, 2022
Feb 7, 2024
Jul 12, 2021
Feb 7, 2024
Aug 7, 2023
Jun 22, 2022
Feb 6, 2024
Feb 7, 2024
Feb 7, 2024
Jun 19, 2023

Repository files navigation

mcat-ras

CI Pipeline E2E Tests

Contains the HEC-RAS model content and analysis tool (MCAT). Given a .prj file, this MCAT identifies paths to the plan, forcing, and geometry files and extracts the model's metadata and geospatial data.

The MCAT includes:

  • a standard set of methods to evaluate a model's content:
    • isamodel
    • modeltype
    • modelversion
    • index
    • isgeospatial
    • geospatialdata
    • forcingdata
  • 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-RAS 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:

For local:

STORE_TYPE='LOCAL'

For S3:

STORE_TYPE='S3'
AWS_ACCESS_KEY_ID='**************'
AWS_SECRET_ACCESS_KEY='**************'
AWS_DEFAULT_REGION='us-east-1'
S3_BUCKET='******'
  • Select the stage in docker-compose.yml file
  • 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>

GET /forcingdata?definition_file=<s3_key>

For example: http://mcat-ras:5600/isamodel?definition_file=models/ras/CHURCH HOUSE GULLY/CHURCH HOUSE GULLY.prj

Swagger Documentation:


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

About

HEC-RAS Model Content and Analysis Tool (MCAT)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.3%
  • Dockerfile 0.7%