USACE / go-consequences

A lightweight consequences computational engine written in Go
MIT License
14 stars 11 forks source link

Add Critical Infrastructure Elements to hsip-api.go #117

Closed HenryGeorgist closed 7 months ago

HenryGeorgist commented 8 months ago

The critical_infrastructure branch of go-consequences is developing the feature to include critical infrastructure as a consequence receptor provider. The groundwork has already been laid, but the implementation needs to be extended to include all critical infrastructure elements that are necessary for CHART.

Work with Idris to get the list of all critical infrastructure elements, and their associated lifelines and update the hsip provider to include those elements.

Use the hifld data explorer to find each layer to add: https://hifld-geoplatform.opendata.arcgis.com/search?collection=Dataset

select on it and use the "I want to use this" menu item at the lower left corner of the page on the resulting viewer to expose the option to view API resources. Copy the GeoJSON link to clipboard and update the hsip-api.go file to include the necessary elements to integrate this feature.

  1. Add a clear name to the constants that represent each critical infrastructure layer https://github.com/USACE/go-consequences/blob/fde3667fb69ca1617f8b603923fb9de32dacea88/criticalinfrastructure/hsip-api.go#L24
  2. update the string array to put the feature service name in the string array at the same index as the constant in the constants. https://github.com/USACE/go-consequences/blob/fde3667fb69ca1617f8b603923fb9de32dacea88/criticalinfrastructure/hsip-api.go#L34
  3. update the occypancy type array string to include a pretty print name of the layer (no spaces, no weird gdb type stuff) https://github.com/USACE/go-consequences/blob/fde3667fb69ca1617f8b603923fb9de32dacea88/criticalinfrastructure/hsip-api.go#L37
  4. update the damage category array string to include the lifeline it sits under. https://github.com/USACE/go-consequences/blob/fde3667fb69ca1617f8b603923fb9de32dacea88/criticalinfrastructure/hsip-api.go#L40C2-L42C2

relates to chart-docs issue 44 and 43

marko-nedzbala commented 7 months ago

A few items before I can complete it in it's entirely. 1.) Do we have a variable naming convention (outside of GoLang). For example max length of variable name. Some of the variables are in PascalCase and others in Snake_Case. Not sure of the reason for this. 2.) There are 46 layers in the Excel file, but I was unable to find 9 of them and 3 additional layers there is difficult in obtaining a GeoJSON call. We might need alternative data sources.

HenryGeorgist commented 7 months ago

closing with #116