This is the frontend repository for the Texas Damage Plain application. This tool is designed to allow users to visualize, search and download images of the Damage Plain.
This is a React-based frontend application, using open layers for the mapping and geoserver to host the WMS and Vector Tiles.
This repository uses React Router v5 for client-side routing. The main routes component can be found in src/components/Main.js.
The src
directory is split into the following sub-directories:
/components
- all React components/data
- json files for direction to wms and mvts/views
- main pages, most edits will be in the Hazards.js
There are three primary spatial APIs this application queries to fetch data, a geoserver WMS Layer to visualize the Damage Plain . Mapbox Vector Tiles (MVTs) are used to supply the download locations for each clipped raster. Currently, two boundaries have been generated using Hydrologic Unit Codes (HUC-8 and HUC-12)
MVTs and selections can be editin in the MVT.js file, and the WMS layer is loaded through OLWMT.js.
If this is your first time running the project, run npm install .
to install all of the necessary dependencies.
Run npm start
to start the app in the development mode. Open http://localhost:3000 to view it
in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
Development and production builds can be created with npm run build:dev
and npm run build:prod
respectively.