-
Notifications
You must be signed in to change notification settings - Fork 31
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
shapely backend for isochrone #398
Conversation
i'm not in love with the |
@ljwolf two quick questions if you have a minute:
|
On 1, I think I would prefer to deprecate the On 2, yes, you'd need to convert the I think the current implementation will silently drop any points if they are snapped to the same OSMID: import numpy
# many origins have the same OSMID
osmids = list(numpy.arange(5).astype(str))*3
origins = numpy.arange(15)
# but only the last one enters the lookup
dict(zip(osmids, origins))
# what _induce_cliques() needs is like:
pandas.DataFrame.from_dict(
dict(osm=osmids, origins=origins)
).groupby("osm").origins.agg(list).to_dict() |
Oh, and |
@ljwolf dope, thank you. that's straightforward (on 1, i made shapely the default with ratio=0.2, which works nicely for this application. On the binding circles, I we should be able to grab that from geos now? though not sure exactly which options are exposed in shapely. Doubt its worth reimplementing either) |
this allows the use of concave hull from shapely in addition to alpha shapes from libpysal for isochrone generation. The concave hull is faster, and can be much tighter. Thats not a very fair comparison since we're using 'auto' alpha shapes, but the shapely's hull seems easier to tune than the manual auto shape (good results around ratio=0.2)
also resolves #399