Re: [R-sig-Geo] R version of gdal_polygonize.py

2013-02-13 Thread Matteo Mattiuzzi
Hi Jonathan, for what I understand from your question the main issue is the resizing of the pixels to a larger size. The solution below is 1 not very performant and 2 not fully memory save as polygonToRaster is used again, but maybe you find something usefull. Matteo # largest area function (

Re: [R-sig-Geo] R version of gdal_polygonize.py

2013-02-12 Thread Lyndon Estes
Hi Jonathan, With rasterToPolygons, the dissolve = T argument should do what you want in terms of merging common value polygons, provided you have rgeos installed. I also use the a system call to gdal_polygonize.py, which seems to help for larger polygons. runGdalPolygonize <- function(inraster,

[R-sig-Geo] R version of gdal_polygonize.py

2013-02-12 Thread Jonathan Greenberg
R-sig-geo'ers: Continuing on my quest to *precisely* reproject/resize a categorical raster where the output cell is the category which has the maximum areal cover of that cell (this is not the same as nearest neighbor), it is looking more and more like the solution is to first convert a class rast