anonymize_site: Anonymize locations of a trial site
Description
anonymize_site transforms coordinates to remove potential identification information.
Usage
anonymize_site(trial, ID = NULL, latvar = "lat", longvar = "long")
Value
A list of class "CRTsp".
Arguments
trial
"CRTsp" object or trial data frame with co-ordinates of households
ID
name of column used as an identifier for the points
latvar
name of column containing latitudes in decimal degrees
longvar
name of column containing longitudes in decimal degrees
Details
The coordinates are transformed to support confidentiality of
information linked to households by replacing precise geo-locations with transformed co-ordinates which preserve distances
but not positions. The input may have either lat long or x,y coordinates.
The function first searches for any lat long co-ordinates and converts these to x,y
Cartesian coordinates. These are then are rotated by a random angle about a random origin. The returned object
has transformed co-ordinates re-centred at the origin. Centroids stored in the "CRTsp" object are removed.
Other data are unchanged.