Giter VIP home page Giter VIP logo

rasterdiv's People

Contributors

mattmar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rasterdiv's Issues

Apply Rao's Q to Sampling Grid

I have a RasterLayer that contains NDVI values and I have a sampling grid as a SpatialPolygonsDataFrame. Here are the details of those two objects:

NDVI_ext
class : RasterLayer
dimensions : 2716, 2880, 7822080 (nrow, ncol, ncell)
resolution : 3.125, 3.125 (x, y)
extent : 270084.4, 279084.4, 1764175, 1772663 (xmin, xmax, ymin, ymax)
crs : +proj=utm +zone=16 +datum=WGS84 +units=m +no_defs
source : memory
names : layer
values : 0.4966216, 0.9459583 (min, max)

NDVI_spdf
class : SpatialPolygonsDataFrame
features : 232
extent : 270084.4, 279084.4, 1764175, 1772663 (xmin, xmax, ymin, ymax)
crs : +proj=utm +zone=16 +datum=WGS84 +units=m +no_defs
variables : 1
names : ID,
min values : 1,
max values : 232,

I want to calculate Rao's Q inside each cell of the grid using the field "ID", analogous to the use of the "CONTINENT" field shown in the example vignette (https://mattmar.github.io/rasterdiv/articles/rasterdiv_area_based_Rao.html). But when I do this, I receive an error:

paRao( x=NDVI_ext, area=NDVI_spdf, field='ID', window=9 )
Error in combn(p, m = 2, FUN = prod, na.rm = TRUE) : n < m

Is there a clear solution to this problem? I suspect there is an alternative approach in uses raster::extract to apply the paRao function to each sample unit in the grid, but it's not obvious how to do this either because of the moving window.

Any advice about this issue would be helpful. I am also new to posting to Issues so if this is not the appropriate venue or format, do let me know.

could not find function "registerDoParallel"

I am able to run Shannon, Renyi, or Roa on an EVI2 raster without np but get the following if I run np = 6 (my workstation has 6 cores):

Object x check OK:
Shannon output matrix will be returned.

################ Starting parallel calculation ##################
Error in registerDoParallel(cls) : could not find function "registerDoParallel"

Thanks

Output not generating

I used the Rao function on the NDVI image with a moving window of 3. It has been more than 5 days since the function running. Will the function generate output or it will keep going on like this. The NDVI image is of Sentinel-2 and covering around 500 km sq area.

Screenshot (40)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.