What's different between function agCoords() and agBaseCoords()? #163
-
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. Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
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.
I only ever use agCoords. Hope this helps and you're getting on okay with Racmacs. |
Beta Was this translation helpful? Give feedback.
-
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. As you have found you can access the same information from the map object through accessing its list structure directly e.g. your I hope that helps, Sam |
Beta Was this translation helpful? Give feedback.
-
Thanks, Sarah. Thanks, Sam. Your response helps a lot :) |
Beta Was this translation helpful? Give feedback.
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 callagCoords()
it additionally applies any transformations stored inmapTransformation()
. 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 structur…