I am finding some methods that can provide simple output.
I found a useful method StandardDistance_stats in ARCGIS, but the result is not what i am looking for, I only need the result of a lat/lng point and the size of the circle in number form, so I can plot it to my web map.
Now I am using geomean in geosphere package, it gives the mean of lat/lng points but still missing the size of the circle.
Edit: I found a solution for it, but I am stuck in import R script into Java
d <- read.csv(file="./points.csv", header=TRUE, sep=",")
x <- d$lng
y <- d$lat
w <- d$weight
df <- data.frame(x,y)
mean = geomean(df,w)
.sdd <- function(t,mean) {
x <- t$lng
y <- t$lat
x <- x-mean[1]
y <- y-mean[2]
x <- x*x
y <- y*y
result <- (Reduce("+",x)/length(x))+ (Reduce("+",y)/length(y))
result <- sqrt(result)
return(result)
}
.sdd(d,mean)
Edit: I was trying to run R script file in java. i figured it out. It was because the permission problem, I was not allowed to access the root of C drive.
Base on this answer, I am not sure what should I modify in this line. I know that there are lots of Datums. if my list of lat/lng are mostly 22.0,144.0m is this line still suitable?
CRS.new <- CRS("+proj=somerc +lat_0=46.9524056 +lon_0=7.43958333 +ellps=bessel +x_0=2600000 +y_0=1200000 +towgs84=674.374,15.056,405.346 +units=m +k_0=1 +no_defs")