nowcommunity / nowdatabase

Rebuild of the nowdatabase application for luomus
MIT License
3 stars 1 forks source link

Calculated values #85

Open ShootingStar91 opened 3 months ago

ShootingStar91 commented 3 months ago
- [ ] Locality > Climate > **Pollen Record fields**

- must be a positive integer value between 0 and 100.
- The combined value of Arboreal pollen (AP%), Non-arboreal pollen (NAP%), and Other pollen (OP%) must be less than or equal to 100%.

- [ ] Age things: **Fractions etc.**

- [x] Species > Teeth > **Functional Crown Type**
CONCAT(
  CASE WHEN fct_al IS NULL OR fct_al = "" THEN "-" ELSE fct_al END,
  CASE WHEN fct_ol IS NULL OR fct_ol = "" THEN "-" ELSE fct_ol END,
  CASE WHEN fct_sf IS NULL OR fct_sf = "" THEN "-" ELSE fct_sf END,
  CASE WHEN fct_ot IS NULL OR fct_ot = "" THEN "-" ELSE fct_ot END,
  CASE WHEN fct_cm IS NULL OR fct_cm = "" THEN "-" ELSE fct_cm END
) AS functional_crown_type,
- [x] Species > Teeth > **Developmental Crown Type**
CONCAT(
  CASE WHEN cusp_shape IS NULL OR cusp_shape = "" THEN "-" ELSE cusp_shape END,
  CASE WHEN cusp_count_buccal IS NULL OR cusp_count_buccal = "" THEN "-" ELSE cusp_count_buccal END,
  CASE WHEN cusp_count_lingual IS NULL OR cusp_count_lingual = "" THEN "-" ELSE cusp_count_lingual END,
  CASE WHEN loph_count_lon IS NULL OR loph_count_lon = "" THEN "-" ELSE loph_count_lon END,
  CASE WHEN loph_count_trs IS NULL OR loph_count_trs = "" THEN "-" ELSE loph_count_trs END
) AS developmental_crown_type
- [x] Species > Teeth > **Normalized Score**

`// Normalized mesowear score: [0-100] -- Scale: max - min -- Display value is calculated (value - min) / scale * 100 => (value - min) / (max - min) * 100
`

- [ ] Locality > Locality: **Latitude, Longitude**
Jouni may provide the exact formula how to calculate the values between decimal decrees and dms. Below are some restrictions:
            <b>Latitude dms</b> must be entered with positive numbers in format DD MM SS N or DD MM SS S where DD is 0 - 90, MM 0 - 59, SS 0 - 59 and N and S are compass directions for North or South.<br><br>
            <b>Longitude dms</b> must be entered with positive numbers in format DDD MM SS E or DDD MM SS W where DDD is 0 - 180, MM 0 - 59 and SS 0 - 59 and E and W are compass directions for East or West.<br><br>
            <b>Latitude dec</b> must be a positive or negative real number ranging from 0 to 90, northern latitudes are positive and southern latitudes are negative.<br><br>
            <b>Longitude dec</b> must be a positive or negative real number ranging from 0 to 180, eastern longitudes are positive and western longitudes are negative.<br><br>