Skip to content

Optionally exclude input geom from results#1166

Merged
sgillies merged 3 commits intomasterfrom
issue1106
Jul 15, 2021
Merged

Optionally exclude input geom from results#1166
sgillies merged 3 commits intomasterfrom
issue1106

Conversation

@sgillies
Copy link
Copy Markdown
Contributor

Resolves #1106

@sgillies sgillies added this to the 1.8 milestone Jul 12, 2021
@sgillies sgillies self-assigned this Jul 12, 2021
@coveralls
Copy link
Copy Markdown

coveralls commented Jul 12, 2021

Coverage Status

Coverage increased (+0.02%) to 85.29% when pulling 55bf523 on issue1106 into 1991a72 on master.

geom2 = ctypes.cast(item2, ctypes.py_object).value
dist = ctypes.cast(distance, ctypes.POINTER(ctypes.c_double))
lgeos.GEOSDistance(self._rev[idx]._geom, geom2._geom, dist)
if callback_userdata["exclusive"] and self._rev[idx].equals(geom2):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a great insight about cost of an equality test in pygeos/pygeos#324, but that could wait until a beta release. Slow is okay for 1.8a2, nailing down the interface is the important thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to use strtree to find an element nearest to it but not its own?

2 participants