AtlasOfLivingAustralia / regions

Regions front end web application
https://regions.ala.org.au
1 stars 16 forks source link

Species checklists generated from Regions are blank #102

Closed adam-collins closed 1 year ago

adam-collins commented 1 year ago

Species checklist downloads are blank. This is only when produced via the Regions tool (either from a direct download or following through to view records in the Biocache, then download).

Species checklist downloads are not blank when produced from a Biocache query directly.

Reported by user, replicated by KM and TH - ticket #180399

adam-collins commented 1 year ago

@kylie-m Can I please get an example. I tested https://regions.ala.org.au/Bush%20Heritage%20Reserves/Beringa#group=ALL_SPECIES&subgroup=&guid=&from=1850&to=2023&tab=speciesTab&fq= and the checklist download was not blank.

kylie-m commented 1 year ago

No worries @adam-collins, here's the primary example -

https://regions.ala.org.au/Local%20government/MORETON%2520BAY%2520REGIONAL#group=Reptiles&subgroup=&guid=&from=1850&to=2023&tab=speciesTab&fq=species_subgroup%3A(%22Lizards,%20Snakes%22%20OR%20%22Tortoises,%20Turtles,%20Terrapins%22)

and a couple more:

Moreton Bay regional - mammals

NT - reptiles

ACT - fish

kylie-m commented 1 year ago

Update: I believe the issue is particular filters/facets, it may not be regions at all.

I've got this similar Biocache query working now (ie species checklist download not blank) https://biocache.ala.org.au/occurrence/search?q=cl10923%3A%22MORETON%20BAY%20REGIONAL%[…]group%3A%22Reptiles%22&fq=occurrence_status%3A%22PRESENT%22

but when I add the additional filters in, it breaks (i.e. species checklist download is blank) https://biocache.ala.org.au/occurrence/search?q=cl10923%3A%22MORETON%20BAY%20REGIONAL%[…]A&fq=occurrence_year%3A%5B+TO+2023-12-31T23%3A59%3A59Z%5D

It seems to be narrowed down to both of the species subgroup facets

  1. 'Lizards and snakes' https://biocache.ala.org.au/occurrence/search?q=*%3A*&qualityProfile=ALA&wkt=MULTIPOLYGON(((145.810546875%20-35.8044491119149%2C145.810546875%20-36.51405119943165%2C146.865234375%20-36.51405119943165%2C146.865234375%20-35.8044491119149%2C145.810546875%20-35.8044491119149)))&fq=species_subgroup%3A%22Lizards%2C%20Snakes%22#tab_mapView

  2. 'Tortoises turtles and terrapins' https://biocache.ala.org.au/occurrence/search?q=*%3A*&qualityProfile=ALA&wkt=MULTIPOLYGON(((145.810546875%20-35.8044491119149%2C145.810546875%20-36.51405119943165%2C146.865234375%20-36.51405119943165%2C146.865234375%20-35.8044491119149%2C145.810546875%20-35.8044491119149)))&fq=species_subgroup%3A%22Tortoises%2C%20Turtles%2C%20Terrapins%22#tab_mapView

Species checklist d/l is working for other species subgroup facts, and combinations of 2 , e.g. https://biocache.ala.org.au/occurrence/search?q=*%3A*&qualityProfile=ALA&wkt=MULTIPOLYGON(((145.810546875%20-35.8044491119149%2C145.810546875%20-36.51405119943165%2C146.865234375%20-36.51405119943165%2C146.865234375%20-35.8044491119149%2C145.810546875%20-35.8044491119149)))&fq=(species_subgroup%3A%22Falcons%22%20OR%20species_subgroup%3A%22Cuckoos%22)#tab_mapView

Also, switching from the 2 species subgroup facets to use lifeform: reptiles gets the same number of records returned, and produces a download successfully: https://biocache.ala.org.au/occurrence/search?q=cl10923%3A%22MORETON%20BAY%20REGIONAL%22&qualityProfile=ALA&fq=occurrence_year%3A%5B*%20TO%202023-12-31T23%3A59%3A59Z%5D&fq=rank%3A(species%20OR%20subspecies)&fq=-occurrence_status_s%3Aabsent&fq=geospatial_kosher%3Atrue&fq=occurrence_year%3A*&fq=species_group%3A%22Reptiles%22#tab_mapView

adam-collins commented 1 year ago

Because the test environment does not have layer intersections at this time, please use this to test the species checklist download:

adam-collins commented 1 year ago

fixed by this commit https://github.com/AtlasOfLivingAustralia/biocache-service/commit/4aa74e185b80fb4b3b1dea063e15de2b60f0078d

kylie-m commented 1 year ago

Thanks Adam! the test above worked for me too

adam-collins commented 1 year ago

deployed