[R-sig-Geo] Question:manipulating spatial data using combination of Maptools and Splancs
kostas karis
kostaskaris at hotmail.com
Mon Sep 19 12:00:49 CEST 2005
I ran the commands as you suggested and it rans ok, until the ploting
>akto<-readShapePoly("akto.shp")
>quakes<-readShapePoints("QD15.shp")
>ls()
[1] "akto" "quakes"
>sp_quakes<-coordinates(quakes)
>sp_akto<-getPolygonCoordsSlot(getPolygonsPolygonsSlot(getSpPpolygonsSlot(akto)[[1]])[[1]])
when i type
>polymap(sp_akto)
the shape that the device plots isn't right. the rings and shapes indices
are correct but the output is wrong. I used another shapefile with more
shapes and i get the following error:
>nomoi<-readShapePoly("nomoi.shp",verbose=T)
Shapefile type: Polygon, (5), # of Shapes: 52
>sp_nomoi<-getPolygonCoordsSlot(getPolygonsPolygonsSlot(
+getSpPpolygonsSlot(nomoi)[[52]])[[52]])
Error in getPolygonsPolygonsSlot(getSpPpolygonsSlot(nomoi)[[52]])[[52]] :
subscript out of bounds
I currently write my Msc thesis and i am using open-source programs for the
processing of spatial data. I am using R for the spatial statistics part but
this is the first time that i use this program so i would really appreciate
your help.
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
More information about the R-sig-Geo
mailing list