In cases when one layer has a larger extent than another, such as NLCD and ARA, it is possible to get Spatial Keys from one which are not available in the other. This would previously cause a crash. Now we default to an empty tile (with NODATA values) instead.
Also add an example request of a square shape in Phoenix, AZ which is within NLCD but outside ARA. This request would previously cause an Index Out of Bounds error. Now we get back correct values, with NODATA for ARA.
We use int NODATA, not the float one, because this will only apply to the keys of the result. In the result, the values can be int or float, but the keys are always ints.
Overview
In cases when one layer has a larger extent than another, such as NLCD and ARA, it is possible to get Spatial Keys from one which are not available in the other. This would previously cause a crash. Now we default to an empty tile (with NODATA values) instead.
Also add an example request of a square shape in Phoenix, AZ which is within NLCD but outside ARA. This request would previously cause an Index Out of Bounds error. Now we get back correct values, with NODATA for ARA.
Connects https://github.com/WikiWatershed/model-my-watershed/issues/3239
Demo
On
develop
:On this branch:
Notes
MMW will have to be updated to handle the NODATA values, which currently treats them as 0 instead of "No Data". For example, onThis has been done in https://github.com/WikiWatershed/model-my-watershed/pull/3241.develop
:On this branch:
We use int
NODATA
, not the float one, because this will only apply to the keys of the result. In the result, the values can be int or float, but the keys are always ints.Testing Instructions
EmptyTileRequest.json
develop
NODATA
valuesThough not necessary, in case you'd like to try this with MMW, the way to test it is:
And then go to :8000/, which will use the new geoprocessing service.