Fixes a bug with how we load forecast and fire zones from shapefile #1463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do? 🛠️
Previously, we'd encountered a situation where the zones shapefile could include multiple entries for a single zone. We mistakenly believed this was simply a duplication. However, zones are sometimes described by multiple polygons. We only kept the first polygon we encountered for a given zone, resulting in a couple dozen zones that had wildly incorrect geometries. Worse, it meant we could sometimes tell a user that there were no alerts for them because we had a misrepresentation of zones in our database. And it showed up visually (see #1409) where we drew the zone on the map, but what we drew was not the entire zone.
To fix this, our zones table is modified to expect a geometry collection for its
shape
column. When we import zones from the shapefile, we collect all geometries for a single zone and put them into the geometry collection for that zone's database row.What does the reviewer need to know? 🤔
After merging, we will need to run a spatial load on all of our environments.