-
Notifications
You must be signed in to change notification settings - Fork 88
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
segfault when masking raster with cropped SpatVector #1572
Comments
I have faced a similar error when working with SpatRaster re-projection.
|
I do get: Error: basic_string::_M_create
|
@Rapsodia86 I just reran my example on my current version of R and got the same error as initially reported (see below). Perhaps there is something different in how R on Windows detects and catches errors compared to Linux?
My full sessioninfo():
|
I think the problem is with the shapefile of Canada, which after cropping ends up with 8812 geometries, while originally has 13. Using bbox should not increase the number of geometries. But it does, maybe due to islands? See further down. The original vector "noam" has 64 geometries (polygons: 51 USA + 13 CAN), and using it,
And you can not select for the "noam_can" beyond 13, although it shows 8812 geometries!
And look here into a number of geometries depending on the
Hi @rhijmans, do you know what is going on with the cropping of Canada gadm shapefile? Thanks! |
When cropping a raster with a SpatVector that has itself been cropped I'm getting a repeatable segfault.
MWE:
Crashes with the following output:
I have used
is.valid
to checkmainland
is a valid SpatVector.I've tried different cropping. Setting y max to 84 or higher doesn't produce an error. The upper extent of
noam
is 83.1104, so maybe this has something to do with how the cropped polygons are handled?System info:
Thanks for your attention!
The text was updated successfully, but these errors were encountered: