I have to create non-overlapping, irregular, hexagons (voronoi hexagons) around coordinate points. i found some answers to similar problems on SO and other places but i did not manage to adapt those solutions.
how to draw tilegram/hexagon map in R
https://gis.stackexchange.com/questions/273233/create-spatial-polygon-grid-from-spatial-points-in-r
How do I generate a Hexagonal grid in R
Create hexagonal grid over city and associate with lon / lat points (in R)
it is possible to do it just with sp, raster and rgdal as i have some partial data (see pic below) but i can't reproduce it.
The coordinates of the points come from an shp that looks like this:
class : SpatialPointsDataFrame
features : 148392
extent : -179.9844, 179.6227, 53.00372, 79.90965 (xmin, xmax, ymin, ymax)
crs : +proj=longlat +datum=WGS84 +no_defs
variables : 7
names : point, cell, grid, lat, lon, cntr, cont
min values : 2601723, 100, warp, 53.003719, -179.984421, Canada, Arctic
max values : 3213512, 967, warp, 79.909653, 179.622711, USA, NorthAmerica
dput sample here:
structure(list(point = c(3110786, 2861560, 2864634, 2864638,
2864642, 2867700), cell = c("428", "282", "282", "282", "282",
"282"), grid = c("warp", "warp", "warp", "warp", "warp", "warp"
), lat = c(72.407028, 61.31004, 61.422215, 61.422215, 61.422215,
61.534386), lon = c(-120.742577, -140.21254, -140.013031, -140.247162,
-140.481308, -140.047607), cntr = c("Canada", "Canada", "Canada",
"Canada", "Canada", "Canada"), cont = c("Arctic", "Arctic", "Arctic",
"Arctic", "Arctic", "Arctic")), row.names = c(NA, 6L), class = "data.frame")
the result should be an shp and look something like this:
the points are from the shp, only the hexagon structure is needed.