I have a forest cover image having 5 land cover classes (very dense forest, mod. dense forest, open forest, scrub and non-forest) and a road shapefile with five types of roads. I'm thinking of creating a new image containing only two classes (forest and non-forest) and calculating fragmentation index (km/sq.km)(which is basically road density) per 10 km cell. But how do I calculate the index separately for each class?