Reflecting on your privacy concern, I decide to suggest the following solution.
Note that many web services, i.e. API, give access to geocoding data using external codes from plugins in softwares like qgis or from R libraries. One R solution, that I find easy to implement is attached here and based upon the RJSONIO
package.
Now about the privacy concern. I think that it shouldn't discourge you from using those API's, since:
- Be sure that it is most possible that google, already has data on those locations.
- Second, and most important - you can easily dis-link data of an address from other information about the teanent or costumer on those adresses. That is through a unique ID-field that relate address, and after geocoding x,y coords, with other relevant data.
Namely, ou have to split your data table to create (1) UniqueID and adresses and (2) UniqueID and other data table. You will use table (1) for geocoding, not giving away any data but addresses (thah google already has); Than you can take the geocoded data and join it to table (2) based on your UniqueID.
Other calculations of distance than can be made using arcmap, R or qgis; and for my taste there is a room to discuss them in other questions, if needed.
Here is a R code that uses Google API for geocoding.
Disclaimer: I downloaded the code from a R-tutorial website, and can't remember the author, so can't give any credit. Yet it is GNU.
library(RCurl)
library(RJSONIO)
library(plyr)
url <- function(address, return.call = "json", sensor = "false") {
root <- "http://maps.google.com/maps/api/geocode/"
u <- paste(root, return.call, "?address=", address, "&sensor=", sensor, sep = "")
return(URLencode(u))
}
geoCode <- function(address,verbose=FALSE) {
if(verbose) cat(address,"\n")
u <- url(address)
doc <- getURL(u)
x <- fromJSON(doc,simplify = FALSE)
if(x$status=="OK") {
lat <- x$results[[1]]$geometry$location$lat
lng <- x$results[[1]]$geometry$location$lng
location_type <- x$results[[1]]$geometry$location_type
formatted_address <- x$results[[1]]$formatted_address
return(c(lat, lng, location_type, formatted_address))
} else {
return(c(NA,NA,NA, NA))
}
}