-
-
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
lasmergespatial bug if merging with shapefile attribute #223
Comments
If you can't share the file, at least show me the code and an image of the input/output because I don't understand what is going wrong. Did you try to reproduce with data provided with the package? |
Easy to reproduce. Bug confirmed. I should be able to fix it within few hours. LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
shp <- system.file("extdata", "lake_polygons_UTM17.shp", package = "lidR")
las <- readLAS(LASfile, select = "xyz")
lakes <- shapefile(shp)
las <- lasmergespatial(las, lakes, "ANY")
table(las@data$ANY)
las <- lasmergespatial(las, lakes, "LAKENAME_1")
table(las@data$LAKENAME_1) |
Fixed |
I was out of office for two days, thanks for solving this problem so fast! |
Unfortunately there is another problem with lasmergespatial: |
Could you please open a new issue with the data, the image, the explanation + a reproducible code. Thank you. |
Hi,
I have a bug where
lasmergespatial(las, polygon, "ID")
assigns theSpatialPolygonDataframe
's attributeID
not to the points that lay within the polygons, but to the firstlength(polygon)
of points in subsequent order.They are in the same projection and
lasclassify
worked for the same kind of las dataset and polygon structure.I would upload the las-file, but it's kinda big, so maybe someone comes up with a solution without.
Thanks,
NatKat
The text was updated successfully, but these errors were encountered: