Reputation: 143
I would like to label Voronoi polygons with point attributes (in this case, station name and station number). To create Voronoi polygons, I used the function from this topic.
My station data file (shapefile) is in here.
pts <- readOGR(dsn = ".", layer="rainfallStations")
thiessen.pol <- voronoipolygons(pts)
proj <- CRS('+proj=longlat +ellps=WGS84')
proj4string(thiessen.pol) <- proj
Upvotes: 1
Views: 342
Reputation: 27388
You could text
with coordinates
, e.g.:
plot(thiessen.pol)
text(coordinates(thiessen.pol), labels=pts$STA_NUMBER, cex=0.9)
Upvotes: 1