WikiWatershed / mmw-geoprocessing

A Spark Job Server job for Model My Watershed geoprocessing.
Apache License 2.0
6 stars 6 forks source link

Add Multiple MultiLine Support to Multi Endpoint #94

Closed rajadain closed 2 years ago

rajadain commented 2 years ago

Overview

Previously the run endpoint would take a list of MultiLine strings, and the multi endpoint would take a single MultiLine string. Given the way we collected the lines from the base NHD dataset, this was fine, as there was a single MultiLine string at the end of collection.

However, this was changed to incorporate the high resolution streams in https://github.com/WikiWatershed/model-my-watershed/pull/3428, specifically in https://github.com/WikiWatershed/model-my-watershed/commit/4f48577790b5d382ad902733ad19ce05424b536c. This was necessary because the high resolution dataset is composed of MultiLines, and collects into a GeometryCollection rather than a MultiLine.

This new style worked with the run endpoint, which is used for analysis, but not with the multi endpoint, which is used for modeling. To enable modeling of high resolution streams, we now change the multi endpoint to also take a list of MultiLine strings.

Connects https://github.com/WikiWatershed/model-my-watershed/issues/3429

Notes

This is a breaking change to the API, will need a major version bump.

The request examples were generated by json.dumps(data, indent=4) right before this line. The response examples were generated by:

http :8090/multi < examples/MultiOperationRequestHUC12HiResStreams.json | jq . | sponge examples/MultiOperationResponseHUC12HiResStreams.json

Testing Instructions

rajadain commented 2 years ago

Thanks for reviewing!