Closed danangmassandy closed 2 months ago
This is implemented in above PRs, however I still need to handle duplication of client_id in server side. It's possible to have same client_id but we need to ensure the API returns the input layer that the file is ready.
closing this ticket because we introduced a default layer concept, so we don't need to sync layers between user's computer.
Background User is able to access input layer in the server with following rules:
Plugin needs to be able to do mapping between layers that will be used for the analysis and the accessible layers in the server side so the plugin can avoid uploading layer that already exists in the server.
Proposed Solution The simplest solution that we discussed during sprint meeting is that the plugin just check and upload layer before running analysis. If the plugin detects a new layer, then the plugin will begin uploading the layer and once finished, the plugin will save the server identifier (
layer_uuid
). This has been implemented in current plugin version. However, user is not able to use common/internal layers that already exists in the server.I'm proposing to use a
client_id
to do mapping betweenlayer_uuid
andclient_id
. Layers can haveclient_id
if only the layers are inside the CPLUS base directory. The reason is the plugin may have default pathways and carbon layers inside this directory. The format to generateclient_id
would be:{relative_filepath}_{crs}_{size_x}_{size_y}_{file_size}
Consider the directory tree below for an example to generate the
client_id
. ├── CPLUS │ ├── ncs_pathways │ │ ├── Final_Alien_Invasive_Plant_priority_norm.tif │ │ ├── Final_Avoided_Wetland_priority_norm.tif │ ├── ncs_carbon │ │ ├── bou_SOC_carbonsum_norm_null_con_clip.tifThe generated
client_id
would be in following table.When the plugin is able to sync
client_id
between local layer files and layer files in the server, the user can do analysis in both local and online seamlessly.