FMestre1 / lconnect

Simple tools to compute landscape connectivity metrics
6 stars 3 forks source link

Problem #7

Closed neiloliveira closed 1 year ago

neiloliveira commented 1 year ago

I have been trying to calculate IIC using patch_imp function, but I keep getting this error message:

__Error in dconn[i] <- 100 * ((full_conn - partial_conn)/full_conn) : replacement has length zero In addition: Warning message: In max(clusters) : no non-missing arguments to max; returning -Inf__

Also, after I Import and convert a shapefile to an object of class "lconnect", If I try to plot the shp, I get this message:

_Error in plot_sf(x, ...) : NA value(s) in bounding box. Trying to plot empty geometries?_

I have tried to correct the geometry of the shp, I have converted multipolygon to poligon, I have created new shapes and nothing seems to work.

I'd appreciate any help with this issue.

Thanks in advance.

FMestre1 commented 1 year ago

Hello, Can you send de data em code, replicating your error? Thanks, Frederico

neiloliveira commented 1 year ago

Hello,

After so many trials, I got it right. I was first trying with a shapefile with more than one class of vegetation patches (Primary and Secondary). When I joined the classes into a single one, the analysis ran smoothly (although it took a while to complete).

Thanks for answering.

Neil

FMestre1 commented 1 year ago

I'm glad it worked out! Frederico