Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
文档字符串说:
Polygon.contains如果几何包含另一个,则返回 True,否则返回 False
Polygon.contains
Polygon.within如果几何在另一个内,则返回 True,否则返回 False
Polygon.within
它们有何不同?
它们是反向关系:A包含B和B在 内A。
A
B
>>> A.contains(B) True >>> B.within(A) True +----------------------------------+ | | | +----------+ | | | | | | | | | | | | | | | | | | | | | | | B | | | | | | | +----------+ | | | | | | A | | | +----------------------------------+