
Assign polygons in one spatvector to polygons in another spatvector, based on greatest overlap
Source:R/assign_polygons.R
assign_polygons.Rd
Assign polygons in one spatvector to polygons in another spatvector, based on greatest overlap
Examples
#fa.poly<-vect('C:/Users/SUTTONJO/Documents/GCCODE/fisheries-landscape/analysis/lobster/data/fleet_polygons_formatted.shp')
#naf<-get_shapefile('nafo.clipped')
#naf<-project(naf,fa.poly)
#x<-crop(fa.poly,naf)
#x<-x[,13]
#y=naf[,1]
#test<-assign_polygons(x,y)
#test
#ggplot()+
#geom_spatvector(data=test[which(test$Label%in%c('4T','4S')),],aes(fill=Label))+#,col=NA
#geom_spatvector(data=naf,aes(col=Label),fill=NA)