Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally exclude input geom from results #1166

Merged
merged 3 commits into from
Jul 15, 2021
Merged

Optionally exclude input geom from results #1166

merged 3 commits into from
Jul 15, 2021

Conversation

sgillies
Copy link
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

coveralls commented Jul 12, 2021

Coverage Status

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

idx = ctypes.cast(item1, ctypes.py_object).value
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
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