I have an polygon of GIS object,e.g. rectangle. I would like to extract all of edges according to their compass orientation. How can i do that?
Here is a simple example
poly = Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2)))
polygons = Polygons(list(poly), "s3")
SpP = SpatialPolygons(list(polygons))
plot(SpP)
The upper edgs for eg. is related to the north. But how can i identify it via script?