Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOI Upload/Download: Sub AOI's #4

Open
lbross opened this issue Aug 7, 2015 · 6 comments
Open

AOI Upload/Download: Sub AOI's #4

lbross opened this issue Aug 7, 2015 · 6 comments

Comments

@lbross
Copy link
Contributor

lbross commented Aug 7, 2015

Do we need to upload/download sub aoi's? Sub aoi's are used by BAGIS-P to exempt areas from parameter calculation.

@jdduh
Copy link

jdduh commented Aug 8, 2015

The easiest way for us is to not allow nested AOIs on the server, but to create a new attribute (e.g., parent AOI) for the AOI. Users need to manually update the attribute value by selecting an existing AOI on the server to set the Parent AOI value. They are also need to put the child AOIs into the parent AOI folder manually if they want to use the subAOI function in BAGIS-P. We could put some warning messages in the downloader program when an AOI to be downloaded has a parent AOI.

@lbross
Copy link
Contributor Author

lbross commented Aug 10, 2015

This issue references PSU-CSAR/django-ebagis#2

@lbross
Copy link
Contributor Author

lbross commented Aug 10, 2015

AOI Upload: PC-BAGIS will query the parent folder to determine if it is a parent AOI. If so, PC-BAGIS will query the web service the retrieve the parent's aoi id from the database. If the parent id exists, PC-BAGIS will send it as a field in the sub-aoi upload so that the web service can link the two entities together. If the parent is not in the database, PC-BAGIS will warn the user that they must successfully upload the parent before uploading the sub-aoi if they want the sub-aoi to be linked to the parent.

@lbross
Copy link
Contributor Author

lbross commented Aug 10, 2015

AOI Download: If a parent AOI is requested, the web service will send a list of the sub-aoi id's and names. Not sure how this will work as the service currently just sends a .zip file with no other fields. PC-BAGIS needs to store/display this sub-aoi information in a manner that allows the user to easily download all the sub-aois following download of the parent if desired. Will the parent id be sent with the child .zip?

@jkeifer
Copy link
Member

jkeifer commented Aug 28, 2015

I may be able to send you the ID of an AOI when the upload is initially created now that I am converting the model IDs to UUIDs (PSU-CSAR/django-ebagis#7). I am thinking the likelihood of a collision is so low that I can pre-generate the ID before the AOI is added to the database. Yes, this opens up a race condition, but I think the ID space is so incredibly huge compared to the number of AOIs that will ever be in the system that it likely shouldn't matter.

Because of this, BAGIS won't have to wait long to start child uploads (just until the first upload object is returned, say after the first file chunk completes). This is a somewhat major change that I need to think a bit more about before I get to implementation, but I will keep this thread updated as I make progress.

@lbross
Copy link
Contributor Author

lbross commented Dec 14, 2015

Updated system design calls for a summary metadata file to be downloaded when an AOI is downloaded from the database. The parent metadata could be used to extract the UID so that it can be included as a field with the sub-aoi upload. We will check here first and if there is no metadata, we will query the database to see if the parent is present.

This functionality will be implemented in PSU-CSAR/django-ebagis#26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants