I imported the attached tiff file and converted the coordinate system to long lat and graphed it:
californiatiff<- readGDAL("california1.tif") proj4string(californiatiff) > rasterprojection <- spTransform(californiatiff, CRS("+proj=longlat") however, when using the plot command for rasterprojection, I get a blob. I can see the outline of the state of california and nevada, but rather than being able to see the geographic features, it is just a monocolor blob. My suspicion is that since it is a list of coordinates and another column that contains attributes, I need to turn it into a polygon. I've tried the following codes but none work: > rasterprojection2<-SpatialPolygons(rasterprojection) Error in is.vector(X) : trying to get slot "Polygons" from an object of a basic class ("integer") with no slots rasterprojection2<- Polygons(rasterprojection) Error in as.vector(x, "list") : cannot coerce type 'S4' to vector of type 'list' Essentially, all I need to do is to connect the coordinates into polygons. What am I doing wrong? Thank you!
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.