Skip to content

texture_image() error: length of 'dimnames' [1] not equal to array extent #14

Description

@seanobrochta

I'm trying to create an output raster of sa calculations from LiDAR data I created. Here is the code I am using:

outrast <- texture_image(x, metric = "sa", window_type = "square", parallel = FALSE)

When I do the above with the normforest data, it works fine, but every time I run it on my own data, the following error appears

Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :
length of 'dimnames' [1] not equal to array extent

I'm assuming this has something to do with the structure of my raster, but I'm not sure. I thought it might be because I had an uneven number of rows and columns within my raster, but to test that I edited my raster to make them equal and got the same error. I've tried cropping the raster as well and this also did not work. Any suggestions would be helpful!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions