Project

General

Profile

Actions

feature request #3904

closed

EuroMed: Implement filtering rules for distributions

Added by Andreas Kohlbecker over 9 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
New
Category:
cdmlib-remote
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
(Total: 16:00 h)
Severity:
major

Description

ticket split off from #3712: display of distributions in Euro+Med portal


Generic rules

  1. Filter out distributions for areas which have a Marker hideInDistribution - to be implemented into DescriptionUtility.filterDistributions()

old idea discarded: _filter out areas without area shape mapping (technical annotation with xml DescriptionUtility.filterDistributions()

  1. prefer specific distributions over others: #3906 (EuroMed: preference of distribution status in case multiple distributions exist for the same area) - Distributions are referred according to the SummaryStatus order, see #2625 summaryStatus - to be implemented into ???

together these generic rules should reproduce the result as created by the Access-Module ( FillHelsinkiOccurrence_v10.adp )

Checked whether if this assumption is true (AK):

  • Rule (1): this filtering seems to have taken place in Helsinki?

  • Rule (2): TRUE

  • Rule (3): TRUE

This tasks also involves adding the according functionality to the dataportal module: #3977 (allow defining the MarkerType to filter out excluded NamedAreas from distributions)


Files

FillHelsinkiOccurrence_v10.adp (71.5 KB) FillHelsinkiOccurrence_v10.adp Andreas Kohlbecker, 11/25/2013 04:33 PM
FillHelsinkiOccurrence.bas (6.91 KB) FillHelsinkiOccurrence.bas Andreas Kohlbecker, 11/28/2013 02:35 PM
EuroPlusMed-Areas.png (97.3 KB) EuroPlusMed-Areas.png Andreas Kohlbecker, 06/26/2015 05:46 PM

Subtasks 2 (0 open2 closed)

bug #4409: fallback areas are not adressable in the shape fileClosedAndreas Kohlbecker

Actions
feature request #5050: revise the subAreaPreference rule for filtering DistributionsClosedAndreas Kohlbecker

Actions

Related issues

Related to EDIT - feature request #9502: Implement subarea preference rule and fallback areas for areas with complex hierarchyIn ProgressAndreas Müller

Actions
Related to EDIT - feature request #9500: Allow removing certain distribution status from distribution publicationIn ProgressAndreas Müller

Actions
Actions #1

Updated by Andreas Kohlbecker over 9 years ago

Rules

Actions #2

Updated by Andreas Kohlbecker over 9 years ago

original email

Hallo Andreas K.,

... es bei der textuellen Anzeige einiger Verbreitungsangaben noch Probleme. Als Beispiel dient mir mal wieder das Gänseblümchen, Bellis perennis http://test.e-taxonomy.eu/dataportal/preview/euromed/cdm_dataportal/taxon/0eb6ca37-3365-4af5-a800-8fc4b8c366fa Wünschenswert wäre, die bisherigen Regeln für die Generierung des Euro+Med-Verbreitungsstrings einfach eins zu eins umzusetzen. Diese Regeln existieren ja, wir müssen sie nicht neu erfinden. Soweit ich weiß, hat Anton dies programmiert. Der Reihe nach: A) Ausgaberegeln:

  • Cz Former Czechoslovakia soll nur dann ausgegeben werden, wenn es für keines der Teilareale (Cs Czech Republic oder Sk Slovakia) eine Angabe gibt;

  • Ju Former Jugoslavia soll nur dann ausgegeben werden, wenn es für keines der Teilareale (BH, Cg, Ct, Mk, Sl, Sr) eine Angabe gibt ;

  • IJ Israel-Jordan soll nur dann ausgegeben werden, wenn es für keines der Teilareale (Ir, Jo) eine Angabe gibt;

  • LS Lebanon-Syria soll nur dann ausgegeben werden, wenn es für keines der Teilareale (Le, Sy) eine Angabe gibt;

  • Former USSR (Rs) und seine Teilareale - Rs(B), Rs(C), Rs(E), Rs(K), Rs(N), Rs(W) – sollen niemals ausgegeben werden;

Actions #3

Updated by Andreas Kohlbecker over 9 years ago

Wednesday 15:29:07

Das Problem ist, dass unser Datenbestand einfach nicht einheitlich ist und nicht so einfach zu säubern ist, wie wir es gerne hätten. Die Aufspaltung des Areals Ju in die Unterareale zum Beispiel erfordert, dass die Editoren für jedes einzelne Taxon sieben bis zehn Florenwerke auswerten müssen, um zu einer exakten Verbreitung in Bosnien-Herzegowina, Kroatien, Montenegro, Makedonien, Serbien und Slowenien zu kommen. Viel Arbeit! Für Compositen und andere Familien ist das gemacht, da wollen wir nur die detaillierteren Unterareale sehen. Da aber zum Beispiel Karol Marhold das für seine Familien (einige tausend Taxa) nicht gemacht hat, ist es in diesen Fällen immer noch besser, die Angabe Ju (die aus Med-Checklist oder Flora Europaea stammt) in Karte und Text darzustellen, als alle Areale leer zu lassen.

Gleiches gilt für die einigen tausend Taxa, die wir von Kew bekommen haben. Dort gibt es nur Ju, Cz und Tcs, nicht aber die jeweiligen E+M-Unterareale. Hier müssen wir eben bis auf weiteres auch diese Ober-Areale anzeigen, weil es keine Unterareal-Angaben gibt!

Wie gesagt, die Regeln sind im alten Euro-Med-Portal perfekt implementiert:

siehe Karte für Türkenbundlilie Lilium martagon

http://euromed.luomus.fi/euromed_map.php?taxon=506324&size=medium

im neuen Portal dagegen sind (konsequenterweise, aber falsch) Cz und Ju leer - dürfen sie aber nach der Regel nicht sein! vergleiche:

http://test.e-taxonomy.eu/dataportal/preview/euromed/cdm_dataportal/taxon/7ddb75d9-b5a1-4941-99e6-c81456750bda

Also, die Mission ist, dies so umzusetzen wie im alten Portal. Ich sehe nicht, wie wir darum herumkommen, dies auch im neuen Portal so zu implementieren. Wie gesagt, die Algorithmen dafür hat Anton entwickelt!

Schönen Gruß, Eckhard

Actions #4

Updated by Andreas Kohlbecker over 9 years ago

  • Severity changed from normal to critical
Actions #5

Updated by Andreas Kohlbecker over 9 years ago

Friday 15:35:21

Hallo Andreas,

Ich bin mir nicht sicher, worauf sich das mit den Statusangaben bezieht. Zum einen gibt es ja den „SummaryStatus“ der dafür sorgt, dass bei konkurrierenden Statusangaben (z.B. Teilareal1= Nativ, Teilareal2=Introduced) die richtige Summary für das ganze Areal gemacht wird (in diesem Falle: native). Das Gleiche dann auch für Sub-Taxa und Taxa. Das ist aber Teil der TransmissionEngine, so dass Du das eigentlich haben müsstest.

Und dann gibt es noch ein kleines Programm, mit dem die Daten gefiltert werden, die wir dann nach Helsinki für die Kartendarstellung schicken. Darin werden zum Beispiele Records rausgeschmissen, wenn es mehrere konkurrierende Angaben zum gleichen Taxon/Areal gibt. Meinst Du das? Ich hänge Dir mal das Access-Modul an.

Viele Grüße

Anton

Actions #6

Updated by Andreas Kohlbecker over 9 years ago

Rules implemented into FillHelsinkiOccurrence

  1. collect most significant Distributions

    1. walk all distinct areas of a given taxon
    2. get all Distributions for a given area and order them BY CalculatedFlag DESC, SummaryStatus DESC" (prefer calculated and use highest SummaryStatus
  2. Filter Distributions:

 Clean HelsinkiOccurrence table so that superareas are removed if subareas with identical status value exist.

 The definition of super- and subareas is:

     HS <-- HS(A), HS(G), HS(S)

     GA <-- GA(F), GA(C)

     JU <-- BH, CG, CT, MK, SL, SR

     AE <-- AE(G), AE(T)

     LS <-- LE, SY

     IJ <-- IR, JO

     AB <-- AB(A), AB(N)

     TCS <-- AB, AR, GG

     Cz <-- Cs, Sk

     Md <-- Md(D), Md(M), Md(P)

     Bl <-- Bl(I), Bl(M), Bl(N)

     Ca <-- Ca(C), Ca(F), Ca(G), Ca(H), Ca(L), Ca(P), Ca(T)

     Az <-- Az(C), Az(F), Az(G), Az(J), Az(L), Az(M), Az(P), Az(S), Az(T)

     Hb <-- Hb(E), Hb(N)

     Rf <-- Rf(A), Rf(C), Rf(CS), Rf(E), Rf(K), Rf(N), Rf(NW), Rf(S)

     Tu <-- Tu(A), Tu(E)

     Uk <-- Uk(K), Uk(U)

     Si <-- Si(S), Si(M) Hinzugefügt von Dominik 22_11_2013

     Be <-- Be(B), Be(L) Hinzugefügt von Dominik 22_11_2013
Actions #7

Updated by Andreas Kohlbecker over 9 years ago

  • Status changed from New to In Progress

implemented rules 2 and 3: r19676

Actions #8

Updated by Andreas Kohlbecker over 9 years ago

updating first rule after discussion with Andreas Müller

Actions #9

Updated by Andreas Kohlbecker over 9 years ago

third rule is also implemented: r19733

now we only need a unit test for this

Actions #10

Updated by Andreas Kohlbecker over 9 years ago

  • Severity changed from critical to major

for now we will use a second database for publishing, the entities marked as unpublished can be filtered out at the database level, so this issue is no longer critical.

Actions #11

Updated by Andreas Kohlbecker over 9 years ago

Replying to a.kohlbecker:

for now we will use a second database for publishing, the entities marked as unpublished can be filtered out at the database level, so this issue is no longer critical.

this comment is misplaced, it was for an other ticket and could be deleted if the trac ticketdelete plugin was working

Actions #12

Updated by Andreas Kohlbecker over 9 years ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Andreas Kohlbecker to e.raab-straube -

test implemented r19970

@Eckhard: You can start testing this once once the ticket #3977 (allow defining the MarkerType to filter out excluded NamedAreas from distributions) is also fixed

Actions #13

Updated by Andreas Kohlbecker over 9 years ago

more commits:

  • r19971

  • r19992

Actions #14

Updated by Andreas Kohlbecker about 9 years ago

  • Keywords set to Euro+Med,Migration
Actions #15

Updated by Andreas Kohlbecker almost 9 years ago

what to do for the review: "Check if the filtering works as expected"

Actions #16

Updated by Andreas Kohlbecker almost 9 years ago

Hallo Eckhard,

Im ticket werden drei filter regeln genannt:

  1. Filter out distributions for areas which have a Marker hideInDistribution

  2. filter out distribution with areas whose subordinate areas are also use in a Distribution for the same taxon.

  3. prefer specific distributions over others: = #3906 (EuroMed: preference of distribution status in case multiple distributions exist for the same area) - Distributions are preferred according to the status order

Review:

  1. Funktioniert wohl, das hast du, Eckhard in deiner anderen Email geschrieben

  2. hierfür werden in den Kommentaren 2 und 3 des Tickets Beispiele genannt:

Bellis perennis:

  • Slovakia kommt vor also Former Czechoslovakia nicht ausgegeben werden: Funktioniert nicht bei Former Czechoslovakia ist es genauso!

und das obwohl die 'Sub area preference rule' in http://test.e-taxonomy.eu/dataportal/preview/euromed/admin/config/cdm_dataportal/settings gesetzt ist, da müssen wir also nochmal nachbessern.

  1. prefer specific distributions over other

habe ich bisher nicht noch mal geprüft, kannst du das machen Eckhard?

Andreas

Actions #17

Updated by Andreas Kohlbecker almost 9 years ago

  • Status changed from Resolved to In Progress
  • Assignee changed from e.raab-straube - to Andreas Kohlbecker

I found something interesting in the source code:

The exact description of the subAreaPreference rule is like:

"If there is an area with a direct sub area and both areas have the same computed status only the information on the sub area should be reported, whereas the super area should be ignored."

also

"(NOTE: this rule only applies only to non computed areas, since the second rule is applied first!.TODO this is no longer valid since the second rule has been removed)"

the second rule once was the following:

"In computed distributions, distributions in parent areas are preferred over those for direct sub areas if they have the same status"

I find this confusing even if I wrote all of this.

I guess this filter is not really working since the "second rule" for computed areas still somehow active, this assumption is underpinned by a question in the according test method (@testFilterDistributions_subAreaPreference()@) which analogously means: "Is it correct that the subAreaPreference has no effect if the parent and sub areas are computed?" I guess it is an error

I also checked the history of this ticket and of the source code and I have no idea where this second rule came from,it must have been a misunderstanding.

Actions #18

Updated by Andreas Kohlbecker almost 9 years ago

Replying to a.kohlbecker:

Bellis perennis:

  • Slovakia kommt vor also Former Czechoslovakia nicht ausgegeben werden: Funktioniert nicht bei Former Czechoslovakia ist es genauso!

und das obwohl die 'Sub area preference rule' in http://test.e-taxonomy.eu/dataportal/preview/euromed/admin/config/cdm_dataportal/settings gesetzt ist, da müssen wir also nochmal nachbessern.

Lilium martagon:

  • es sind keine Unterareale vorhanden, also müssten Ju, Cz und Tcs auch in der Karte grün markiert sein, sie sind aber weiß. Da funktioniert die Regel also nicht, nach der diese Areale nur ignoriert werden sollen, wenn Unterareale vorhanden sind. Dies ist aber für keines der drei genannten Areale der Fall. Sie sind auch keine "hidden areas".
  1. prefer specific distributions over other

habe ich bisher nicht noch mal geprüft, kannst du das machen Eckhard?

Andreas

Ich habe das Beispiel Solidago canadensis gewählt:

http://test.e-taxonomy.eu/dataportal/preview/euromed/cdm_dataportal/taxon/6f8147d9-4e46-4a89-ad65-8c280fd7c9d1

Fehlerhafte Status-Resultate sind:

|Hs(A) Andorra: kartiert ist "introduced"|prioritär wäre "introduced: naturalized"|jetzt korrekt! :-)|
|Bu Bulgaria: kartiert ist "cultivated"|prioritär wäre "introduced: naturalized"|jetzt korrekt! :-)|
|Ga(F) France(level2): kartiert ist "NO STATUS"|prioritär wäre "introduced: naturalized"|immer noch falsch! :(|
|Br Great Britain: kartiert ist "cultivated"|prioritär wäre "introduced: naturalized"|jetzt korrekt! :-)|
|Lt Latvia: kartiert ist "cultivated"|prioritär wäre "introduced: naturalized"|jetzt korrekt! :-)|
|Au(L) Liechtenstein: kartiert ist "NO STATUS"|prioritär wäre "introduced: naturalized"|immer noch falsch! :(|
|Ho Netherlands: kartiert ist "cultivated"|prioritär wäre "introduced: naturalized"|jetzt korrekt! :-)|
|Su Sweden: kartiert ist "NO STATUS"|prioritär wäre "introduced: naturalized"|immer noch falsch! :(|

Der Status "NO STATUS", der als "present" in der Karte ausgegeben wird, scheint in der Priorisierung keine Rolle zu spielen. Er sollte die unterste Priorität erhalten.

Schönen Gruß, Eckhard

Actions #19

Updated by Andreas Kohlbecker almost 9 years ago

Replying to a.kohlbecker:

Replying to a.kohlbecker:

Bellis perennis:

  • Slovakia kommt vor also Former Czechoslovakia nicht ausgegeben werden: Funktioniert nicht bei Former Czechoslovakia ist es genauso!

und das obwohl die 'Sub area preference rule' in http://test.e-taxonomy.eu/dataportal/preview/euromed/admin/config/cdm_dataportal/settings gesetzt ist, da müssen wir also nochmal nachbessern.

Lilium martagon:

  • es sind keine Unterareale vorhanden, also müssten Ju, Cz und Tcs auch in der Karte grün markiert sein, sie sind aber weiß. Da funktioniert die Regel also nicht, nach der diese Areale nur ignoriert werden sollen, wenn Unterareale vorhanden sind. Dies ist aber für keines der drei genannten Areale der Fall. Sie sind auch keine "hidden areas".
  1. prefer specific distributions over other

Der Status "NO STATUS", der als "present" in der Karte ausgegeben wird, scheint in der Priorisierung keine Rolle zu spielen. Er sollte die unterste Priorität erhalten.

Schönen Gruß, Eckhard

Das is nun repariert: r21567

Andreas

Actions #20

Updated by Andreas Kohlbecker almost 9 years ago

behalf of e.raab-straube

Wie gesagt: es funktioniert nach wie vor nicht für die Regel, nach der die

Areale auch im Text nicht ausgegeben werden sollen, wenn es Unterareale

gibt.

Siehe:

http://test.e-taxonomy.eu/dataportal/preview/euromed/cdm_dataportal/taxon/30e3ae84-a01f-4b3b-86d6-6ef2249dc2e1#footnote-E

In diesem Text sollen "Former Yugoslavia" and "Former Czechoslovakia" nicht ausgegeben werden, weil diese Information aufgrund der Unterareale redundant ist.

Actions #21

Updated by Andreas Kohlbecker almost 8 years ago

  • Status changed from In Progress to New
  • Assignee changed from Andreas Kohlbecker to Andreas Müller

Hallo Eckhard,

in meiner Datenbank wurden die E+M Areas am 20 Mai 2015 angelegt, sind also relativ aktuell.

Für "Former Yugoslavia" und "Former Czechoslovaki" sind keine Hierarchien angelegt, daher kann natürlich auch die subAreaPreference Regel nicht funktionieren.

Hier ein Screeenshot des Vokabulariums im Editor:

Das muss also schon beim Import nicht stimmen. Daher gebe ich das Ticket an Andreas M weiter

Actions #22

Updated by Andreas Müller almost 8 years ago

New area hierarchy implemented by r24461

Actions #23

Updated by Andreas Müller almost 8 years ago

  • Target version changed from Euro+Med Migration to Release 3.7
Actions #24

Updated by Andreas Müller almost 8 years ago

  • Target version changed from Release 3.7 to Release 3.8
Actions #25

Updated by Andreas Kohlbecker almost 8 years ago

  • Status changed from New to Resolved
  • Assignee changed from Andreas Müller to Andreas Kohlbecker

all sub tickets are on status review now

Actions #28

Updated by Andreas Müller over 2 years ago

  • Description updated (diff)
  • Assignee changed from Andreas Kohlbecker to Andreas Müller
Actions #29

Updated by Andreas Müller over 2 years ago

  • Private changed from Yes to No
Actions #30

Updated by Andreas Müller over 2 years ago

  • Related to feature request #9502: Implement subarea preference rule and fallback areas for areas with complex hierarchy added
Actions #31

Updated by Andreas Müller over 2 years ago

  • Subject changed from EuroMed: Implement filtering rules for Distributions to EuroMed: Implement filtering rules for distributions
  • Status changed from Resolved to Closed

All subtasks and related are closed. Open issues are handled in follow up tickets #9500 (for status) and #9502 (for areas).

Actions #32

Updated by Andreas Müller over 2 years ago

  • Related to feature request #9500: Allow removing certain distribution status from distribution publication added
Actions

Also available in: Atom PDF