Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Only run ARA Analysis if within ARA Perimeter #3218
Adds a hand-drawn perimeter of the ARA raster to check the area of interest against when deciding if it should be queried or not. If it is not within the perimeter,
The perimeter is conservative, which is to say that it is smaller than the actual boundary. This is done in the hopes of preempting any edge cases that may query non-existing tiles:
This is done without precision. If there is a better way of generating this perimeter from a raster, I'd be up for trying that.
The ARA Raster does not have data outside the North East and Mid Atlantic regions, and when requests for outside that area go through they cause exceptions in the geoprocessing service. This perimieter, drawn by hand using GeoJSON.io, is a rough approximation of the outline of the raster. It errs on the side of conservatism, i.e. it is smaller than the true perimeter.
mmcfarland left a comment
Working well. I understand the bounds are a little rough, but I agree that it's a reasonable effort and the lack of precision is likely not problematic. Verified that the
Previously, we would always run the NLCD+ARA request, which ended up failing when outside the ARA region. Now we check if the AoI is wholly contained within the ARA Perimeter and only run NLCD+ARA in that case. Otherwise we run only NLCD. The analyze_nlcd task is similarly updated to behave differently when receiving a tuple of values (indicating the presence of ARA results) vs not, sending back nulls instead. We use null vs 0 here to differentiate absence of ARA values within the raster with querying outside the bounds.