Displaying 1 result from an estimated 1 matches for "india_st".
Did you mean:
india's
2011 Jul 09
1
SpatialPolygonsDataFrame holes problem
...tell.com/index.php?option=com_remository&Itemid=159&func=fileinfo&filecatid=115&parent=category
Problem: I want to extract centroid coordinates for each State, but there is some coding problem with the shapefiles that prevents this.
#Code:
#After extracting the shapefiles from the india_state.zip file, then:
library(maptools)
library(sp)
library(rgeos)
india <- readShapeSpatial("india_state.shp")
#Some states are made up of more than one polygon.
#State names are in the NAME column of the dataframe
india at data
plot(india[india$NAME == "Tamil Nadu",], col = 1...