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

sids_from_shapely() for convex is broken #64

Closed
NiklasPhabian opened this issue Nov 5, 2021 · 4 comments
Closed

sids_from_shapely() for convex is broken #64

NiklasPhabian opened this issue Nov 5, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@NiklasPhabian
Copy link
Member

NiklasPhabian commented Nov 5, 2021

sids_from_geoseries(df, resolution=7, convex=True)

results in

---------------------------------------------------------------------------
BrokenProcessPool                         Traceback (most recent call last)
/tmp/ipykernel_65007/3620074687.py in <module>
      7                          meta=meta)
      8 
----> 9 sids = res.compute(scheduler='processes')

~/.virtualenvs/STAREPandas/lib/python3.8/site-packages/dask/base.py in compute(self, **kwargs)
    286         dask.base.compute
    287         """
--> 288         (result,) = compute(self, traverse=False, **kwargs)
    289         return result
    290 

~/.virtualenvs/STAREPandas/lib/python3.8/site-packages/dask/base.py in compute(*args, **kwargs)
    568         postcomputes.append(x.__dask_postcompute__())
    569 
--> 570     results = schedule(dsk, keys, **kwargs)
    571     return repack([f(r, *a) for r, (f, a) in zip(results, postcomputes)])
    572 

~/.virtualenvs/STAREPandas/lib/python3.8/site-packages/dask/multiprocessing.py in get(dsk, keys, num_workers, func_loads, func_dumps, optimize_graph, pool, chunksize, **kwargs)
    217     try:
    218         # Run
--> 219         result = get_async(
    220             pool.submit,
    221             pool._max_workers,

~/.virtualenvs/STAREPandas/lib/python3.8/site-packages/dask/local.py in get_async(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)
    504             while state["waiting"] or state["ready"] or state["running"]:
    505                 fire_tasks(chunksize)
--> 506                 for key, res_info, failed in queue_get(queue).result():
    507                     if failed:
    508                         exc, tb = loads(res_info)

/usr/lib/python3.8/concurrent/futures/_base.py in result(self, timeout)
    435                     raise CancelledError()
    436                 elif self._state == FINISHED:
--> 437                     return self.__get_result()
    438 
    439                 self._condition.wait(timeout)

/usr/lib/python3.8/concurrent/futures/_base.py in __get_result(self)
    387         if self._exception:
    388             try:
--> 389                 raise self._exception
    390             finally:
    391                 # Break a reference cycle with the exception in self._exception

BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
@NiklasPhabian NiklasPhabian changed the title sids_from_geoseries for convex is broken sids_from_shapely() for convex is broken Nov 5, 2021
@NiklasPhabian
Copy link
Member Author

NiklasPhabian commented Nov 5, 2021

obviously traces back to

starepandas.sids_from_shapely(geom=geom, resolution=5, convex=True, force_ccw=True)

@NiklasPhabian NiklasPhabian added the bug Something isn't working label Nov 5, 2021
@NiklasPhabian
Copy link
Member Author

which obviously traces back to

starepandas.sids_from_polygon(polygon=geom, resolution=5, convex=True, force_ccw=True)

@NiklasPhabian
Copy link
Member Author

certainly an issue with pystare's cover_from_hull()

SpatioTemporal/pystare#84

@NiklasPhabian
Copy link
Member Author

NiklasPhabian commented Oct 22, 2023

Maybe broken for some geometries. But not generally broken.

I can easily do:

sdf = geopandas.read_file('../tests/data/hms_smoke20210209.zip')
sdf = starepandas.STAREDataFrame(sdf)
sids = sdf.make_sids(level=10, convex=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant