Adds owner, public fields to a region and model_run. Defaults public to True and owner to None in both instances
Condenses the POST endpoint for Region creation to create a region not associated with model run and being bound to a user with the option to make it Public
Adds a GET /region/details endpoint to get information about owners and public to the list. This also includes some information about why a user can't delete a region. They are only able to delete regions they own that have all model runs removed from them.
Create Region Client Side code. I think I could modify the existing Region button to have an option for 'Add Region' that allows a user to specify a region with name and the public setting.
User regions are filters near the top of the region list
Added a /regions/{region_id}/vector-tile/z/x/y.pbf endpoint. This is to support visualizing regions when no model-runs are associated with them. This is required to be able to see a region and eventually be able to delete it.
Drawing of User Regions has been modified to utilize the new /regions/vector-tile endpoint. I modified region naming so that user regions are indicated by {name}_{userId}. This is for the query selection as well as making sure regions are unique. There are new unique constraints so that the combination of name and owner has to be unique. So now there is a 'value' that is used to indicate a region that is a combination of the name and owner. If the owner is None (it is a system region uploaded by the admin) then it is just the name.
I felt it was better to reference the vector-tiles by the region Id instead of the region name. It is still necessary to use the region name for the URL parameters to make it easy to share regions. To facilitate this I added a regionMap to the store to align a region.
Redid the Layer Selection of Regions to allow regions to be displayed only if they have geometry associated with them. It also only allows deletion if the user is the owner and no models are linked to the region. If you can't delete it there is a tooltip displaying the reason.
I updated model-run endpoint to provide a boundingbox of the region if no model-runs are connected to a region. Previously it would just return a null boundingbox
Connected up deletion of region from the interface
Moved Region updating to the Store as well as storing of the region list because multiple components need to trigger an update as well as use the values. RegionFilter no longer is the only thing that will cause an update to the region list.
Added in basic downloading of a region geojson, right now it sets default values for the custom fields in the region geometry.
resolves #445
owner, public
fields to aregion
andmodel_run
. Defaults public toTrue
and owner toNone
in both instancesPOST
endpoint for Region creation to create a region not associated with model run and being bound to a user with the option to make it PublicGET /region/details
endpoint to get information about owners and public to the list. This also includes some information about why a user can't delete a region. They are only able to delete regions they own that have all model runs removed from them./regions/{region_id}/vector-tile/z/x/y.pbf
endpoint. This is to support visualizing regions when no model-runs are associated with them. This is required to be able to see a region and eventually be able to delete it.regionMap
to the store to align a region.