Skip to content

can't find the function of GE_SpatialGrid

2 messages · Yong Li, Roger Bivand

#
Dear all,

The following is the code I try to build grid from polygons, but was
hammered by the error in the subject. Any idea helps me.

Yong

setwd("d:/Rcode/0_Zone")
library(maptools)

xx <- readShapePoly("Newshape.shp", IDvar="ID",
                    proj4string=CRS("+proj=tmerc
                                    +lat_0=0
                                    +lon_0=111
                                    +k    =1.000000
                                    +x_0  =500000
                                    +y_0  =0
                                    +ellps=krass
                                    +units =m
                                    +no_defs"))

plot(xx, col="red")

grd <- GE_SpatialGrid(xx, asp=1, maxPixels=100)$SG
#
On Thu, 29 Mar 2007, Yong Li wrote:

            
sessionInfo() ?

What is the version of your maptools package - the function you are 
looking for has only been present since 0.6-7.

By the way, GE_SpatialGrid() will not accept an input object which is not 
in geographical coordinates, and yours is projected, but this is not the 
problem you state here.

Roger