AtlasOfLivingAustralia / spatial-hub

New spatial portal front end using AngularJS
https://spatial.ala.org.au/
7 stars 16 forks source link

Contextual layer legend classes missing and selection mapping issues #344

Closed Tasilee closed 1 year ago

Tasilee commented 3 years ago

Describe the bug Not all classes are displayed in legend table for some contextual layers such as the IGBP layer. Also, selecting/deselecting a visible class produces anomalous results on the map

To Reproduce Steps to reproduce the behavior:

  1. Go to Add to Map | Layer | IGBP
  2. Note that only 5/17 classes are visible/accessible <> does nothing
  3. Click on a class in the legend, deselect the class and select another class - not reflected on map

Expected behavior All classes should be accessible, selectable/deslectable and mapped correctly.

Actual behavior Not all classes are accessible or mapable.

Screenshots Capture

adam-collins commented 3 years ago

AtlasOfLivingAustralia/layers-store@a79749d

adam-collins commented 3 years ago

https://github.com/AtlasOfLivingAustralia/spatial-service/commit/24ca6b45e0865ab70e6af557652aad6bb2f76354

qifeng-bai commented 3 years ago

IGBP has filed ID: cl1079a, which causes layer importing partial failed.

https://github.com/AtlasOfLivingAustralia/spatial-service/blob/master/grails-app/services/au/org/ala/spatial/service/ManageLayersService.groovy#L451 parsing field id to integer throws an exception

After discussing with @adam-collins , we altered ID in database directly

No classes are shown up on legend: IGBP is a Raster, but treated as "Contextual Grid".

For a CL(Vector), each vector(polygon) will be written into objects table, which is used to generate contextual selection in spLegend.

For a EL(Raster), the objects table won't get updated. There is also no 'contextual selection' in legend.