I have two shapefiles. The first contains a lot of squares. For each square I have the type of forest cover (Coniferous, leafy or mixed).
The second shapefile contains different polygons with different size and shape. In the second shapefile I have the type or forest cover also and I have the main forest species. I want to found a way to join the information of the polygon of the second shapefile to the first shapefile. I want to have the information of the closest polygon of each square in the square but the type of forest cover need to be the same.
I’m able to join the closest polygon but I am not able to join with the closest polygon with the same type of forest cover I have try with python but I have never used this tool and it doesn’t work
Chantier1 is my first shapefile and chantier2 my second. TYPE_COUV and type_couv2 are the column with the type of forest cover respectively in my shapefile
In summary, for each polygon of chantier1, how do I join the information of the closest polygon of chantier2 with the same type of forest cover?