BiologicalRecordsCentre / BSBI-Card-and-PlantPortal-DEPRECATED-

A portal to promote plant recording and analysis of plant data
0 stars 0 forks source link

PP occurrence cover #69

Closed sacrevert closed 5 months ago

sacrevert commented 7 years ago

@andrewvanbreda I'm sure what you have done is fine for the moment, but in the longer term we will need to think more about accepting different types of cover formats. At the moment, presumably the field will accept any real number? (e.g. cover expressed in percentages or proportions?)

In order to interpret this correctly downstream, we would either need to restrict to one or the other, or ask surveyors to specify the formatting of their cover data as well. An additional area is accepting so called 'cover-abundance' scales, where an integer code maps to a cover interval (e.g. 1 = 0-5%; 2 = 6-10% etc.)

Nested in #46

andrewvanbreda commented 7 years ago

At the moment it is an attribute of type float, so accepts anything like 0.2, 0, 60

Going by what you are saying would a solution be to use different attributes that accept different kinds of cover and therefore could be validation. At the moment it accepts pretty much anything, it was only invented by me to accept what is in your import file

sacrevert commented 7 years ago

OK, I see. Then in the simplest case we could just have Cover (%) and Cover (proportion). I think we will actually need Cover (NVC Domin) fairly early on too. 'NVC Domin' is just the name for a particular scale, but, in the first instance of setting it up as an attribute, all that is needed is a restriction to the integer values 0 to 10. (These could be looked-up against a conversion table subsequently if that was eventually needed for downstream purposes.)

andrewvanbreda commented 7 years ago

I have now changed the code so that we can just supply a comma separated list of occurrence attribute IDs to the page configuration. So we can now do this for the stratum and multiple cover attributes. This means if you change your mind it is easy to change (providing the attributes aren't particularly special in some way and need special code) I have done this because it is actually simpler to code, the only complication is to make sure only the correct attributes are shown on the mapping screen but this seems to be working on my own machine.