Skip to content

What's different between function agCoords() and agBaseCoords()? #163

Answered by shwilks
judyssister asked this question in Q&A
Discussion options

You must be logged in to vote

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 structur…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by shwilks
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #154 on November 28, 2023 13:57.