check completely overlap region between A and B

I'm always using it well. Thank you.

Question:
between region A and region B, I would like to find and return only regions where the two coordinates completely overlap. Is there a method that implements this function?

Comments

    • I want to find that 4coordinates match perfectly, not inside or touching.
  • Sorry, I don't understand.

    Could you give some example, preferably a picture?

    Matthias

  • Instead of looking for where the two regions differ you want to know where they exactly match? If that's the case then it sounds like the opposite of an XOR operation...

    This is what I came up with:

    a_AND_b = region_A.and(region_B) #common overlap
    a_XOR_b = region_A.xor(region_B)  #difference
    exact_region = a_AND_b.not_interacting(a_XOR_b) #when a_AND/XOR_b don't interact and a_AND_b is not an empty layer
    
Sign In or Register to comment.