Hot answers tagged

3 votes
Accepted

Which point lies on which linestring?

Use st_intersects which returns a list for each point of which features the point is on. EG the nc data cast to linear features: > nc Simple feature collection with 100 features and 14 fields ...
user avatar
  • 51.1k
3 votes

QGIS reads blank cells as "nan" instead of "NULL"

I wouldn't be able to help with sorting this in R, however regarding the post-processing in QGIS, you current request in the field calculator is: if("field" = "nan", NULL, "...
user avatar
  • 136
1 vote
Accepted

Creating regular sampling grid, with specific distance between points using R

I would create a SpatRaster using the SpatVector as template, and set the resolution to 10 meters. Then you got a Raster with the desired gap that you can transform to points if needed. On this ...
user avatar
1 vote
Accepted

How to export result of point_metrics() in lidR?

There are plenty of options depending on what you really want to do. You can keep only the points with min Z that way library(lidR) f = system.file("extdata", "Topography.laz", ...
user avatar
  • 7,364
1 vote

'union' between spatial polygons and spatial points in R

I found out how to do it. Two ways: applying point.in.poly(grid, acled). So x= polygons, y=points. applying point.in.poly(ACLED, grid) in the right way then merging with the initial grid. grid....
user avatar
  • 41
1 vote

Calculate sum/average of variable within each group of neighboring counties using R

I had this exact issue a few months ago working on a project and ended up developing a package to do just that. I just now published the package on GitHub and can be installed in R by running devtools:...
user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible