Skip to content

mosaic and use cutline to display only in specific area #625

Closed Answered by yellowcap
satas12825 asked this question in Q&A
Discussion options

You must be logged in to vote

maybe @yellowcap can explain it more smile (#598 (comment))

Yes the way the cutline is configured, all pixels that are touched by the cutline (i.e. the pixel boundary polygon). So pixels will tend to slightly "overflow" the cutline geometry lines. The reason for this is explained in the comment @vincentsarago shared. We want this cutline to give identical results, even if there are multiple resolution in ImageData. This is only guaranteed for all_touched=True mode, otherwise smaller pixels will be dropped and the masks will end up being different.

One way to work around this for now would be to use a negative buffer of about 1 pixel size on your geometry before using it as cutline. This…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@satas12825
Comment options

@vincentsarago
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by satas12825
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