[R-sig-Geo] can't find the function of GE_SpatialGrid
Roger Bivand
Roger.Bivand at nhh.no
Thu Mar 29 15:33:56 CEST 2007
On Thu, 29 Mar 2007, Yong Li wrote:
> 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.
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
>
> 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
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list