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(filename) I get yelled at to feed it a layer name first). 2) Is there a way to tell the feature type (point, polygon, line, etc...) of a readOGR object? 3) How do I get a polygon/line's node coordinates? Using coordinate(readOGR(...)) I only get a single coordinates associated with each polygon/line in the vector.

Thanks!

--j
Hengl, T. wrote:

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 also some examples from:
http://spatial-analyst.net/wiki/index.php?title=Export_maps_to_GE#Polygon_maps

HTH

Tom Hengl

-----Original Message-----
From: [email protected] on behalf of Paul Hiemstra
Sent: Sat 2/14/2009 10:07 PM
To: Jonathan Greenberg
Cc: [email protected]
Subject: Re: [R-sig-Geo] Vector to raster?

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
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone:     +31302535773
Fax:    +31302531145
http://intamap.geo.uu.nl/~paul <http://intamap.geo.uu.nl/%7Epaul>

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


--

Jonathan A. Greenberg, PhD
Postdoctoral Scholar
Center for Spatial Technologies and Remote Sensing (CSTARS)
University of California, Davis
One Shields Avenue
The Barn, Room 250N
Davis, CA 95616
Cell: 415-794-5043
AIM: jgrn307, MSN: [email protected], Gchat: jgrn307

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to