[R-sig-Geo] question about rgeos "gDistance" parameters

Julie Lee-Yaw julleeyaw at yahoo.ca
Fri Nov 10 21:33:14 CET 2017


Can someone better explain what the byid parameter does in the gDistance command? The help for the command states:
"Logical vector determining if the function should be applied across ids (TRUE) or the entire object (FALSE) for spgeom1 and spgeom2"

If spgeom1 is a spatial points objects and spgeom2 is a shapefile with multiple polygons, will byid=FALSE return a single value and byid=TRUE return a matrix of the distances between every point and every polygon? If I'm correct, what does that single value represent (e.g. which distance) when byid=TRUE?
Thanks
	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list