-
-
Notifications
You must be signed in to change notification settings - Fork 9
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 error #3
Comments
Hello, could you provide the exact command used as well as the image in question? |
Good day,
Have you had a chance to review this issue? I've tried a couple more
images and am getting a similar error.
…On Thu., Apr. 15, 2021, 9:55 a.m. Antoine Beyeler ***@***.***> wrote:
Hello, could you provide the exact command used as well as the image in
question?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUNMOBW2UNGZHQX256ZYLTI4K6LANCNFSM426UZW6Q>
.
|
Sorry for the response time. This plug-in is indeed not very robust and this crash happens when the computed "zone" are geometrically too complex. It wouldn't be very difficult to improve but this is unfortunately rather low in my priority list. The easiest way to deal with these errors is to use the
Changing the levels can also help since the zone geometry is largely affected by them. Note that I use the |
No need to apologize! Thank you very much for sharing your work to begin
with.
Cheers!
…On Wed., Apr. 28, 2021, 2:11 a.m. Antoine Beyeler ***@***.***> wrote:
Sorry for the response time.
This plug-in is indeed not very robust and this crash happens when the
computed "zone" are geometrically too complex. It wouldn't be very
difficult to improve but this is unfortunately rather low in my priority
list.
The easiest way to deal with these errors is to use the --blur parameter,
e.g.:
vpype hatched --levels 64 128 200 -b 20 -p 4 -d starwars.jpg
[image: image]
<https://user-images.githubusercontent.com/49431240/116377835-dff1ac80-a811-11eb-93c9-121d56ca2048.png>
Changing the levels can also help since the zone geometry is largely
affected by them. Note that I use the -d parameter so hatched displays a
"debug" view of the zones.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUNMINEW6F2FUKEHQ5X6LTK7GMPANCNFSM426UZW6Q>
.
|
Hi @abey79 I don't mind taking this one next. But I have no idea on the process to fix it. If you give me some lights I can pick this up and try to fix it |
@mariana-s-fernandes Honestly, I don't recall what I had in mind when I wrote the comment above. Basically these errors arise when the shape of the various zones become too complex and somehow result in some invalid Shapely polygon. Smoothing the input image helps by simplifying the zones and reducing the risk of them becoming invalid for Shapely. Properly handling this probably entails:
|
I have run the code above using the new hatched version (with the shapely updates) and I don't get the error. But I will test with other examples |
I'm running into this error:
ERROR:shapely.geos:TopologyException: Input geom 0 is invalid: Ring Self-intersection at or near point 96 320 at 96 320 Error: The operation 'GEOSDifference_r' could not be performed. Likely cause is invalidity of the geometry <shapely.geometry.polygon.Polygon object at 0x00000268A8F91DF0>
The text was updated successfully, but these errors were encountered: