Skip to content

Instantly share code, notes, and snippets.

@pelson
Created March 26, 2014 15:10
Show Gist options
  • Save pelson/9785576 to your computer and use it in GitHub Desktop.
Save pelson/9785576 to your computer and use it in GitHub Desktop.
Demonstration of the new shapely.vectorized functionality
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wcneill
Copy link

wcneill commented Oct 16, 2020

Excellent. I'm excited to put this to the test for something I'm working on!

@snowzky
Copy link

snowzky commented Jan 9, 2021

Is it possible to add the method .intersects to this too? For my use case, I need the points that intersects with the border too, not "just" points within. This solution is the fastest by far in terms of time, and easiest in terms of syntax, so it would be really nice if it could use intersect too.

@pelson
Copy link
Author

pelson commented Feb 1, 2021

This is quite old now. I think geopandas has done a great job of vectorisation of this kind of predicate, and that would be my first point-of-call if I was looking to do this today.

@kvngvikram
Copy link

This is quite old now. I think geopandas has done a great job of vectorisation of this kind of predicate, and that would be my first point-of-call if I was looking to do this today.

Hi, can you direct me about how to get a geopandas based solution. I am not familier with geopandas and don't know how to do it there.

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