Sorry, I meant polygonize via raster::rasterToPolygons

2013/3/8 Mathieu Rajerison <mathieu.rajeri...@gmail.com>

> Hi,
>
> You could rasterize you layer then apply spsample function on each cell.
>
>
> 2013/3/8 Ross Ahmed <rossah...@googlemail.com>
>
>> The following code randomly samples cells within a raster:
>>
>> myRaster <- raster(ncol=10, nrow=10)
>> values(myRaster) <- rnorm(ncell(myRaster))
>> plot(myRaster)
>> library(dismo)
>> xy <- randomPoints(myRaster, n=100)
>> points(xy)
>>
>> Is it possible to randomly sample points within each cell?
>>
>> Thanks
>> Ross
>>
>>
>>
>>
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to