AtlasOfLivingAustralia / mdba-hub

Murray-Darling Basin Authority Portal
0 stars 0 forks source link

Add a preferred image URL to the species list and use that on the iconic species tab #48

Closed chrisala closed 8 years ago

chrisala commented 8 years ago

May need the image to uploaded to the image service so it can thumbnail for us.

pbrenton commented 8 years ago

Spreadsheet of preferred images for iconic species received from MDBA. iconic species images_james (3)_Dad.xlsx

sat01a commented 8 years ago

Example lists webservice response with preferredImageUrl: http://dev.ala.org.au:8082/specieslist-webapp/ws/speciesListItems/dr2042?includeKVP=true [ { id: 166354, name: "Swainsona sericea Silky Swainson-pea", preferredImageUrl: "", lsid: "urn:lsid:biodiversity.org.au:apni.taxon:644499", kvpValues: [ ] }, { id: 406702, name: "Sathon", preferredImageUrl: "http://bie.ala.org.au/repo/1013/128/1285484/smallRaw.jpg", lsid: null, kvpValues: [ ] } ]

charvolant commented 8 years ago

The bie-index can only cope with one preferred image at the moment and it's probably too hard to get it to cleanly do different ones for hubs. However, I'm planning to set things up so that it draws from lists of iconic images when processing things in https://github.com/AtlasOfLivingAustralia/bie-index/issues/3

sat01a commented 8 years ago

Thanks @charvolant, I have issued a pull request (https://github.com/AtlasOfLivingAustralia/specieslist-webapp/pull/43) to include preferred image url by adding additional column to speciesListitem table in species-list app. This will be used by MDBA app to replace default species image with the app specific image.

nickdos commented 8 years ago

I've only just been made aware of this issue. My preference is to have the spreadsheet (linked above) to contain the URL to the image (or thumbnail, or both) in the image-service and to simply have this as the "value" part stored in the specieslist-webapp. No code changes should be needed I'd have thought.

The mdba-hub is already reading the "group" values from the specieslist-webapp and so it should be a few lines of code to grab the imageUrl's as well and simply use them instead of the "default" images we're getting from the BIE at the moment.

The only time consuming part is translating the links provided to image-service links. E.g.

http://mdba-test.ala.org.au/occurrences/24d3daa0-aa66-4fbd-86a2-5cfb1b9abb16 to http://images.ala.org.au/store/7/1/c/a/b195a30e-c195-492a-938c-7bd6d6f7ac17/thumbnail_large

sat01a commented 8 years ago

As suggested by Nick, updated the mdba code to use specieslist key value pair feature. Updated species list with image url link Updated List.xlsx

Key=imageUrl Example druid:dr4786