Closed judyssister closed 1 year ago
I don't know why there are both (perhaps @shwilks can say? It might be something to do eliminating rounding errors), but they should give the same map just with different rotation or reflection. You can check this by calculating the distances between the points and plotting them for the two sets of coordinates e.g.
plot( dist(agCoords(acmap_obj, optimization_number = 1000)), dist(agBaseCoords(acmap_obj, optimization_number = 1000)))
I only ever use agCoords.
Hope this helps and you're getting on okay with Racmacs.
Hi Jing,
Yes Sarah is correct it is to do with rounding errors after transformation of the map, like rotation. Basically, optimization is performed on the map to give the coordinates found in e.g. agBaseCoords()
, but when you call agCoords()
it additionally applies any transformations stored in mapTransformation()
. This means that base coordinates remain unchanged when you align different maps etc. and don't suffer continuous rounding error distortions.
As you have found you can access the same information from the map object through accessing its list structure directly e.g. your acmap_obj$optimizations[[1000]]$ag_base_coords
but this is not recommended since the underlying data structure of the map might change at some point in the future.
I hope that helps,
Sam
Thanks, Sarah. Thanks, Sam. Your response helps a lot :)
Dear authors,
I am confused about the results from:
The results from 2 and 3 are the same, but the output of 1 is different. What's the relationship between function agCoords and agBaseCoords?
Cheers, Jing