Add a unique identifier to each observation.
Arguments
- x
a sf
object with geometries.
Value
A sf
object with an additional column called id
that contains a unique identifier for each observation
Examples
bangalore_boundary <- add_unique_id(bangalore_boundary)
bangalore_boundary
#> geometry
#> 1 77.58112, 77.58112, 77.59010, 77.59010, 77.58112, 12.96842, 12.95967, 12.95967, 12.96842, 12.96842
#> temp_id
#> 1 1