I have set up about 45 camera traps for monitoring hares. The GPS-positions of those are shown in a point layer in QGIS. Based on satellite images, I digitized a map of the research area, with all the fields, streets, villages and so on. Basically, I have a complete map of my research area. I record the type of vegetation and its estimated height in the research area on a weekly basis and add this data to my map.
Every polygon of the map has a unique ID. For every polygon, I have landuse categories on three levels (1E, 2E, 3E in the table below), with every level getting more detailed, as well as the estimated height of the vegetation (H) and the height as a categorie (HK). These values exist for multiple weeks and are entered in one line of the attribute table, as indicated by the suffix "week1" or "week2". The data looks like this:
ID 1E_week1 2E_week1 3E_week1 H_week1 HK_week1 1E_week2 2E_week2 (...) 1 field stubble corn 20-30 low field black fallow field stubble 2 settlement settlement village 0 none settlement settlement
I would now like to calculate the minimal distance from my camera positions (points) to every landuse categorie of level 2 (2E) for every week. The number of categories in 2E will be something between 15 and 20. My desired output would be something like the table below:
cameraID landuse_type minimal_distance[m] Cam_1 stubble field 20 Cam_1 settlement 220 Cam_1 fallow 96 Cam_2 stubble field 0 Cam_2 settlement 150 Cam_2 fallow 72
I already tried to make this work using NNJoin-Plugin and GRASS function
v.distance, but I don't get any useful results from this.
With NNJoin, I can only calculate the distance from the camera traps to the nearest polygon, which gives me only 45 results (Input layer: Camera trap positions, Join layer: Map of research area). These distances are all 0, because every camera trap is located inside a polygon. If I change input and join layer, the plugin calculates which camera trap is the nearest to every single polygon. This is also not helpful.
v.distance, I don't get any distances with the camera traps as "from" and the map as "to". The output is just the attribute table of the camera traps. I left maximum and minimum distance at -1, and set "upload" to dist. Maybe I am using the function wrong, I have difficulties understanding the exact operating mode of the function.
I hope someone can give me advice.