R: Convert points, lines and/or polygons to rasters

Converts any 'SpatialPoints*', 'SpatialLines*', or 'SpatialPolygons*' object to a raster map, and (optional) writes it to an external file (GDAL-supported formats, writes to SAGA GIS format by default). This function basically extends the rasterize function available in the raster package. The advantage of vect2rast, however, is that it requires no input from the user's side i.e. it automatically determines the grid cell size and the bounding box based on the properties of the input data set. The grid cell size is estimated based on the density/size of features in the map (nndist function in spatstat package): (a) in the case of 'SpatialPoints' cell size is determined as half the mean distance between the nearest points, (b) in the case of 'SpatialLines' half cell size is determined as half the mean distance between the lines, (c) in the case of polygon data cell size is determined as half the median size (area) of polygons of interest. For more details see Hengl (2006). To process larger vector maps consider using method='SAGA'. Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 18, 2016 @ 10:12 am