-
Notifications
You must be signed in to change notification settings - Fork 0
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
implement polygon query #10
Conversation
Hi @meiertgrootes. I implemented the polygon query in this branch. Could you please review it? You can use this notebook to test. Your example notebook has been moved here. |
@meiertgrootes I have updated this PR with new example notebooks, on both local and Spider. Thanks for the reviewing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to merge to me. I do have a number of comments, however. These are more about some possible refactoring and expansion than any blocking issues. Please consider converting some into issues so we can pick them up later while still adding the basic functionality to the main branch now
(max(self._obj[kwargs["y"]]) - min(self._obj[kwargs["y"]])) | ||
/ kwargs["dy"] | ||
) | ||
raster = features.rasterize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A possible draw back is having to create ever finer rasters for higher desired densities, as well as the need for possibly non-intuuitive cell sizes.
E.g: select at density 1/m^2 -> grid of dx = dy = 1m
how to select at e.g 5/m^2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for the heads up Meiert! For this function, the application is only for select points to make a network, and there should not be too short arcs within the network. Then I think the requirement is to ensure there is no second point within a specific range. Therefore I think the current implementation is fine.
Thx @meiertgrootes for the feedback! I agree with almost all of them. I converted most of your comments to issues. Also added in-line documentation for density subsetting. Just one thought on the density implementation. Will merge it for now |
Implement polygon enrichment and polygon subset.