Function returns list of points with their weights and lengths from grid cell in spatial object
declstr_weighted(spatial_object, cellsize)
spatial_object | Object of class sfc or sf |
---|---|
cellsize | Target cellsize in map units |
Object of class sf
#> Reading layer `punkty4' from data source `C:\Users\Lenovo\AppData\Local\Temp\RtmpgxlZS1\temp_libpath1b4c671b41b4\declusteringr\points\punkty4.shp' using driver `ESRI Shapefile' #> Simple feature collection with 200 features and 1 field #> geometry type: POINT #> dimension: XY #> bbox: xmin: -1775590 ymin: -5316527 xmax: -1642585 ymax: -5237789 #> epsg (SRID): NA #> proj4string: +proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +units=m +no_defsx = declstr_weighted(spatial_object = points4, cellsize = 10000) x#> Simple feature collection with 200 features and 3 fields #> geometry type: POINT #> dimension: XY #> bbox: xmin: -1775590 ymin: -5316527 xmax: -1642585 ymax: -5237789 #> epsg (SRID): NA #> proj4string: +proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +units=m +no_defs #> First 10 features: #> id received_weights lengths geometry #> 172 0 13.333333 1 POINT (-1652995 -5254057) #> 121 1 3.333333 4 POINT (-1655337 -5267243) #> 139 2 3.333333 4 POINT (-1711804 -5262422) #> 3 3 6.666667 2 POINT (-1748079 -5310699) #> 187 4 6.666667 2 POINT (-1724664 -5244599) #> 140 5 3.333333 4 POINT (-1712603 -5260028) #> 179 6 6.666667 2 POINT (-1748891 -5241387) #> 99 7 3.333333 4 POINT (-1767435 -5271677) #> 150 8 6.666667 2 POINT (-1670705 -5260691) #> 41 9 4.444444 3 POINT (-1649904 -5302388)