-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large rasters cause integer overflow in raster_cell_from_xy()
#785
Comments
Can you clip your dtm to the extent of your point cloud? At some point R has on 32 bits signed integer and 64 bits double. This limits how many integers we can handle. Do you know how terra deals with that ? |
Hey JR, I think the clipping is a workaround, but I was having trouble with parallel processing in (Edit: I resolved the I am playing with simply removing the As far as I can tell, at least for my application using Lines 94 to 121 in 09a878b
where I think the operable part here is and appears to take a double. I can't speak to the other methods (e.g., I wonder if it is sufficient to check if it is a whole number? And even then, Up to you! I mostly wanted to stick this here in case anyone else runs into the same problem. |
Hello,
I noticed an issue attempting to use a large DTM (~100,000 ha, 0.3 m resolution) during the normalization of points. The error I receive is just a warning indicating that the normalization algorithm switches during the operation to some default. Regardless of this specific context, I narrowed down the issue to a problem in
raster_cell_from_xy()
which must convert (in my case) extremely large cell indices into integers, which exceeds the capacity ofas.integer
, forcing the indices to return asNA
values. Here is a reproducible example:Producing the output:
I believe the particular line in question is located here:
lidR/R/utils_raster.R
Line 75 in 09a878b
The text was updated successfully, but these errors were encountered: