Re: [R-sig-Geo] Vector to raster?

2009-02-14 Thread Jonathan Greenberg
Thanks -- another few questions along these lines: 1) Is there any way to determine the type of vector file in advance of defining a layer name? How can I list layer names affiliated with a given vector (it seems to be part of ogrinfo from the main gdal release, but when i do a ogrinfo(filena

Re: [R-sig-Geo] Vector to raster?

2009-02-14 Thread Hengl, T.
If you work with large shapes/grids, try also SAGA: > rsaga.get.usage(lib="grid_gridding", 3) SAGA CMD 2.0.3 library path: C:/Progra~1/saga_vc/modules library name: grid_gridding module name : Shapes to Grid ... But before SAGA, you need to reproject the polygons first (if necessary). see

Re: [R-sig-Geo] Vector to raster?

2009-02-14 Thread Paul Hiemstra
Jonathan Greenberg schreef: How do I take a polygon in some OGR supported vector layer (say, a shapefile), and rasterize it given a pixel size and projection/datum? --j Take a look at the spsample() function. Paul -- Drs. Paul Hiemstra Department of Physical Geography Faculty of Geosciences

[R-sig-Geo] Vector to raster?

2009-02-14 Thread Jonathan Greenberg
How do I take a polygon in some OGR supported vector layer (say, a shapefile), and rasterize it given a pixel size and projection/datum? --j -- Jonathan A. Greenberg, PhD Postdoctoral Scholar Center for Spatial Technologies and Remote Sensing (CSTARS) University of California, Davis One Shield

[R-sig-Geo] SpatialFiltering in spdep: How to create an 'nb' object from an imported spatial weights matrix

2009-02-14 Thread Timo Mitze
Dear List, I have a complete (distance/border based binary) spatial weights matrix from Stata (e.g. as a txt-file). I want to apply spatial filtering in spdep, however the routine needs an "nb" object. Is there any way to extract the information from my matrix automatically (something like mat2nb

Re: [R-sig-Geo] SpatialPolygons decomposition...

2009-02-14 Thread Peter S. Hayes
Thank you, everyone! Let me go walk through some of this, look at the help for some functions that I haven't yet looked at, and see what I can make of it all! :-) I let myself become trapped in a lab class with this issue... found that the as.data.frame() worked fine on SpatialPoints, but ran

Re: [R-sig-Geo] SpatialPolygons decomposition...

2009-02-14 Thread Roger Bivand
On Fri, 13 Feb 2009, Jim Burke wrote: Hi Peter, I think I am three days ahead of you on the learning curve. So come join me! Below is a cumulation of suggestions from Rodger Bivand. Perhaps the code below may help. Start out with your own SpatialPolygon. Change it to a dataframe. Then do so

Re: [R-sig-Geo] SpatialPolygons decomposition...

2009-02-14 Thread Roger Bivand
On Fri, 13 Feb 2009, Peter S. Hayes wrote: Hi All, I'm trying to teach a spatial analysis class using R as a means of learning some details... I'm not an expert in R myself, but am learning it while using it as a 'tool' for lessons in the class... In getting the students familiar with some