I have a multiPolygon shapefile of buildings in a particular city. I read it in with
readOGR and and transform it to my desired planar projection with the following code:
buildings_data<-readOGR("buildings.shp") buildings<- spTransform(buildings_data, CRS("+proj=utm +zone=45 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs "))
It gives me the following output along with transforming:
There were 19 warnings (use warnings() to see them)
All the warnings are:
In Polygon(coords = crds) : less than 4 coordinates in polygon
So how do I remove these polygons with less than 4 coordinates?