Ibercivis / odourcollect.eu

European Union Public License 1.2
1 stars 1 forks source link

Asignation of observations to case studies #72

Closed miguelherpas closed 3 years ago

miguelherpas commented 3 years ago

Same issue as #62. We want to download data for the analysis of a case study (the zone name starts with Masquefa in this case). Please @vvalvesga check it out that is not functioning as expected and the last observation that appears when you filter is on 21/06 meanwhile in that zone there are observations from yesterday (13/07). We have in this case 26 observations that are not assigned to the case study but are located into it.

@AlexAmoSfC @JohanaSfC are trying to figure out which is the problem in this case, but we think that it is related to the assignation of observations to case studies. There is an issue in some locations, as you can see if you check the general database (for example the observations in Southall are well assigned to the case study, but in the case of Masquefa or Castellanza it is not happening for the last 3 weeks).

We have the following doubt: What is the way that OC assigns the observations to a case study? Is it done periodically? How can we be sure that I have all the observations in the file I download when I filter in the BackOffice?

I also submit a couple of pictures that refer to that problem, in the first one you will see the incongruences in the zones. The observation highlighted is in the area of Masquefa's case study but it is not assigned to it. The second one is related to the server, where we saw that all the observations over 10000 are not assigned to the case study zone for this study on Masquefa. If you have any other questions, just tell us!

image image

PD: It would be really helpful for us to have this solved next Monday, as we want to present the analysis that afternoon. We would only need all the observations in that area of study, not only until 21/06. If not we can do it by hand, but it would take us some time...

vvalvesga commented 3 years ago

Creating an odor, it is saved with the basic fields. A location is created. And then a method is called to associate the zone. In this method (zoneAttach) all zones are traversed and its points are traversed for each area and polygons are created. Check if the latitude and longitude of the added point is in any of the polygons. If it is found in any, then it checks if the user who has added it belongs to the zone and if it is true then it adds the zone to the zones associated with the smell.

vvalvesga commented 3 years ago

I've only see theese observations

imagen

vvalvesga commented 3 years ago

imagen

vvalvesga commented 3 years ago

zone 29 masquefa imagen

vvalvesga commented 3 years ago

zone's points imagen

vvalvesga commented 3 years ago

I have seen this observation from 13/07 and you can see how the user who added it is 1408 and this is not assigned to the Masquefa area, I think that is why it has not been added

vvalvesga commented 3 years ago

imagen

vvalvesga commented 3 years ago

That has been my investigation :) Check it and decide what to do. If you want, close issue or maybe change something/create new issue

miguelherpas commented 3 years ago

Thanks for the investigation Víctor. I've checked the observation you commented on before and it has been certainly done inside the area of study.

Nevertheless, I have some doubts:

I still miss which is the exact problem that causes this. If you want, check the following excel file where I gathered all the observations in the area (finding manually all the ones that were not assigned automatically into the zone) You can notice easily that the observations suddenly stop being assigned once they reach the ID number of 10000. That is one of the interesting things that we realized the other day...

OC_CanMata.xlsx

vvalvesga commented 3 years ago

Both, user and odour are assigned to a zone

miguelherpas commented 3 years ago

PD: I just checked the issue and it is no longer happening, thanks for solving it. But I didn't get exactly why this has happened to us. If you remember we had this problem twice already and I still don't get what is wrong. As it is a recurrent issue, I think that we should try to find a permanent solution...

Is there any automatism that is not working correctly? How did you solve it? Do you think this will happen in the future?

vvalvesga commented 3 years ago

If it is found in any, then it checks if the user who has added it belongs to the zone and if it is true then it adds the zone to the zones associated with the smell.

vvalvesga commented 3 years ago

i didn't make any changes The problem I see is that you add observations with a user that is not assigned to that zone.

vvalvesga commented 3 years ago

having that clear, you use a user that belongs to that zone. Then with that user you add observations. I have not invented this logic, I only tell you that this is the procedure.

vvalvesga commented 3 years ago

for me what you say about the id greater than 10000 does not make sense, that is, I do not see any relationship with any of the code

vvalvesga commented 3 years ago

I think I have already found the reason why all the new observations came out yesterday @miguelherpas .

vvalvesga commented 3 years ago

imagen

vvalvesga commented 3 years ago

there is no process. But if there is this button, if you press it then it goes through all the areas, all the smells and checks if it is within a polygon, if so, then it associates the observation with the area. Important: in this case, it does not check if the user is also associated with the zone.

Conclusion: I believe that someone has pressed that button and that is why the observations that were not assigned to their zone have suddenly been assigned to their zone.

frasanz commented 3 years ago

Solution: If an observation belongs geographically to a Zone, put this observation to a zone.