The complete algorithmThe engine's fundamental approach is to recalibrate the existing risk score in Excel. The score has four separate bonus components, a geometric factor and a risk band. Coefficients and limits are fixed in the source code and cannot be changed through the interface.
6.1. Species groups
| Group | Tree species defined in the model | Function |
| HIGH | Walnut, olive, almond, chestnut | Determines the HIGH prestige bonus and parcel group. |
| MID | Apple, pear, apricot, plum, sweet cherry, sour cherry, peach, fig | An abundance bonus based on the total MID count. |
| LOW | All names outside the HIGH and MID lists | Considered as part of total count and species diversity. |
Species names are trimmed and converted to Turkish uppercase. The code also includes some ASCII spellings in its lists. However, matching uses the entire text; for example, CEVİZ AĞACI or ELMA (GOLDEN) may be classified as LOW because these exact strings are not listed. Standardizing species names is important. LOW does not necessarily mean the species has a low market value or low actual economic significance.
6.2. Determining the parcel group
If PARSEL_GRUP is populated in Excel, the model retains it. If empty, it is derived using the following hierarchy:
HIGH_ADET > 0 The parcel is classified as HIGH.
No HIGH, MID_ADET > 0 The parcel is classified as MID.
Neither HIGH nor MID The parcel is classified as LOW.
If an existing group is populated No automatic derivation is performed; the group specified by the data owner is used.
6.3. Four bonus components
| Component | Condition | Additional points |
| HIGH prestige bonus | HIGH count 0 | 0 |
| 1 ≤ HIGH count < 2 | +1 |
| HIGH count ≥ 2 | +2 |
| MID abundance bonus | MID count < 20 | 0 |
| 20 ≤ MID count < 30 | +1 |
| MID count ≥ 30 | +1,5 |
| Density bonus (total count) | Total trees < 40 | 0 |
| 40 ≤ total trees < 80 | +1,5 |
| Total trees ≥ 80 | +2 |
| Species diversity bonus | Total species < 6 | 0 |
| 6 ≤ total species ≤ 10 | +0,5 |
| Total species > 10 | +1 |
Bonuses are calculated independently and added together. For example, 2 HIGH trees, 30 MID trees, 80 trees in total and 11 species together generate a total model bonus of 6.5 points. Although called a density bonus, the algorithm does not use trees/m² or trees/hectare; it considers only the total tree count.
6.4. GEO_FAKTOR based on the expropriation ratio
The ratio of expropriated area to original area becomes a multiplier applied to the sum of base risk and bonuses.
| KAM_ORAN | Geometric factor | Effect on raw score |
| 0 ≤ ratio < 10% | 0,95 | Reduces by 5% |
| 10% ≤ ratio < 30% | 1,00 | No change |
| 30% ≤ ratio < 50% | 1,10 | Increases by 10% |
| 50% ≤ ratio < 80% | 1,20 | Increases by 20% |
| 80% or above | 1,05 | Increases by 5% |
| Actual null or NaN | 1,00 | No change |
Why does 80% or above have a lower multiplier? This is a rule defined in the v3 model: the 50–80% band receives the highest factor, while 80% or above returns to 1.05. The model is not monotonic: a higher expropriation ratio does not always produce a higher score. These thresholds should not be interpreted as scientifically validated probability estimates.
If geometry does not match, existing Excel area and ratio columns are retained; if none exist, empty strings are written. JavaScript's numeric comparison behavior may treat an empty ratio string as 0 and trigger the 0.95 factor. If KML contains no B area, the ratio returns null and 1.00 is used. Keep existing ratios as decimal numbers, such as 0.35, and avoid percentage values written as text.
6.5. Determining the risk band
If the raw score is below the specified lower limit, it is raised to that limit; if above the upper limit, it is reduced to that limit. This defines the effect of species group and mixed-orchard composition on the final score.
8+ species, HIGH present
5–9
0510
*Applies to 4–7 distinct species where the existing or derived group is LOW or MID.
| Condition | Lower limit | Upper limit |
|---|
| Basic LOW parcel | 1 | 5 |
| Basic MID parcel | 2 | 8 |
| Basic HIGH parcel | 4 | 10 |
| Undefined group (default) | 1 | 10 |
| 4–7 species, LOW/MID group | 2 | 7 |
| 8 or more species, no HIGH | 3 | 8 |
| 8 or more species, HIGH present | 5 | 9 |
Mixed-orchard rules take priority: 8 or more species are checked first, followed by the 4–7 species and LOW/MID condition. A mixed HIGH orchard can therefore receive at most 9 points, even with high bonuses.
6.6. Final formula
Raw risk = (RISK + HIGH bonus + MID bonus + density bonus + diversity bonus) × GEO_FAKTOR FINAL_RISK_V3 = raw risk constrained to the risk band and rounded to two decimal places.
A valid initial risk must be supplied. The code's numeric converter may return null for actual null, undefined or invalid text. However, when empty Excel cells are read as empty strings, these may become zero, allowing bonuses and the lower limit to be applied. Do not regard a result produced from a missing score as a reliable new risk score.
6.7. Automatically generated commentary
| Final score | Risk description in the model |
|---|
| 1 ≤ score < 2 | Low |
| 2 ≤ score < 5 | Low, approaching moderate |
| 5 ≤ score < 7 | Moderate to high |
| 7 ≤ score ≤ 10 | High |
Example text: “Considering tree presence and species composition, expropriation risk is generally high.” Existing SUMMARY_V3, or SUMMARY if the former is absent, is retained and this sentence is appended where appropriate. If the existing text already contains the same introductory phrase, it is not appended again. Check descriptions because an old risk comment may remain after rerunning the tool.