pygeoops / pygeoops

Library with some less common or extended spatial functions
https://pygeoops.readthedocs.io
BSD 3-Clause "New" or "Revised" License
16 stars 1 forks source link

IllegalArgumentException: point array must contain 0 or >1 elements #70

Closed bigsu closed 8 months ago

bigsu commented 8 months ago

image Why does this happen? shapely.errors.GEOSException: IllegalArgumentException: point array must contain 0 or >1 elements

road-buffer-14-26969-4551.zip

bigsu commented 8 months ago

This exception is a special case, and I can succeed for the most part image

maybe this answer is helpful to you https://github.com/geopandas/geopandas/issues/2791

bigsu commented 8 months ago

I try to set densify_distance to 1 and there was no error. centerline = pygeoops.centerline(input_geom, 1, -3, -0.1)

bigsu commented 8 months ago

自问自答,兄弟们

theroggy commented 8 months ago

Great you found a workaround!

But, FYI: I'm not able to reproduce the issue you had. I think this issue was solved in #60, so possibly you are using an old version of pygeoops.

bigsu commented 8 months ago

Great you found a workaround!太好了,你找到了一个解决方法!

But, FYI: I'm not able to reproduce the issue you had. I think this issue was solved in #60, so possibly you are using an old version of pygeoops.但是,仅供参考:我无法重现您遇到的问题。我认为这个问题已在 #60 中解决,因此您可能正在使用旧版本的 pygeoops。

I used pip to install but I don't know if it is the latest code