[R-sig-Geo] How the "gSymdifference" of rgoes package calculating the symmetric distance between two polygon
Kaushik Jana
kaushikjana11 at gmail.com
Mon May 2 10:03:03 CEST 2016
Dear all,
I want to calculate the symmetric distance between two polygon. I learned
that "gSymdifference" and "gArea" of "rgoes" can be used for that purpose.
But I am not getting how this difference is calculated (what are R-codes).
The code I am getting by straight forward typing the "gSymdifference" is
giving me:
function (spgeom1, spgeom2, byid = FALSE, id = NULL, drop_lower_td = FALSE,
unaryUnion_if_byid_false = TRUE, checkValidity = FALSE)
{
if (checkValidity) {
val1 <- gIsValid(spgeom1)
val2 <- gIsValid(spgeom2)
if (!val1)
message(deparse(substitute(spgeom1)), " is invalid")
if (!val2)
message(deparse(substitute(spgeom2)), " is invalid")
if (!all(c(val1, val2)))
stop("Invalid objects found")
}
return(RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_lower_td,
unaryUnion_if_byid_false, "rgeos_symdifference"))
}
<environment: namespace:rgeos>
The above is not helping for this purpose. Where from I can get the codes
of the functions and get to know how the "gSymdifference" and "gArea" is
calculating the difference?
Thanks a lot for your time.
Sincerely,
Kaushik
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list