Skip to content

Understanding the difference between transform() and transform_bounds() #1294

Answered by snowman2
tlarcher asked this question in Q&A
Discussion options

You must be logged in to vote

Could one imagine that a CRS would not be linearly transformable to include land (e.g.: islands) outside of the "main" area ? Or for the CRS boundaries to follow natural boundaries (e.g.: mountains) ?

That is not necessarily what is happening. The shape of the boundary in one projection can be quite different in another projection while covering the same locations. The main difference is that the boundary of the shape cannot always be estimated using the corners. All transform_bounds is doing is taking the boundary, adding additional points along the edges of the boundary, re-projecting all of the points and taking the envelope of the new shape.

Here is a function to add points between …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@tlarcher
Comment options

@snowman2
Comment options

Answer selected by tlarcher
@tlarcher
Comment options

@snowman2
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1293 on May 26, 2023 18:28.