Add fault section service endpoint for loaded model
We want the Source Model --> Data Mapping
application to display the GeoJSON features associated with each model. This behavior replaces rendering different tags of nshm-fault-section features.
We already have a http://.../features
endpoint. Like the trees
endpoint. The metadata returned is the listing of source logic tree IDs by source type, and the expectation is that a user then requests a particular .../features/ID
. When requesting a source-tree ID from the features
endpoint, the response includes the GeoJSON features for each branch in the requested source-tree (arranged as a map of `branchName/Path : Feature). In principal this is fine, but for normal faults in the western U.S., a user gets all three dip variants and for complex logic trees such as New Madrid, Wasatch, and Cascadia, the user gets all restitched combinations for each source-tree branch. This is a lot of redundancy and will complicate rendering without a bunch of model specific filtering.
For this issue, add a .../features/{group}
endpoint that returns a FeatureCollection of just the features as supplied in the original source model. The {group}
variable is a String parameter that can be any of [ "all", "fault", "interface", "zone" ]
. This will require some refactoring in nshmp-lib
to hold on to references to the original features used when instantiating the model.
Requires nshmp-lib#184 (closed)