|
Geometry : |
Subject: Re: [geometry] overlay_invalid_input_exception in 1.50
From: V (foxadpatres_at_[hidden])
Date: 2012-08-31 05:51:40
Oh my !
Ok, thanks for your answer (you're fast !)
I didn't check this as I though interecting polygon worked, I'm sorry (and
... the chunk of my code that generate the polygon is not supposed to do
that >< )
Thanks for your time and your help
V
2012/8/31 Barend [via Boost Geometry] <
ml-node+s203548n4025098h97_at_[hidden]>
> Hi,
>
> Welcome to the list!
>
>
> On 31-8-2012 11:09, V wrote:
>
> Hello world
>
> I encounter a overlay_invalid_input_exception while using the
> boost::geometry::intersection(p1,p2,out)
>
> I don't get why it works with some polygons and not with other, any help
> would be very welcome
>
> this work :
> str1 : POLYGON((530 -6890, 3530 -6890, 3680 -8240, 530 -6890))
> str2 : POLYGON((6926 1523, 5926 -10976, 8426 -3476, -4073 -10976, 3426
> -5976, -4073 -976, 6926 1523))
>
> and not this :
> str1 : POLYGON((4280 160, 5930 1810, 6980 1510, 6980 -4490, 5930 -7640, 4280
> -7490, 4280 160))
> str2 : POLYGON((6926 1523, 5926 -10976, 8426 -3476, -4073 -10976, 3426
> -5976, -4073 -976, 6926 1523))
>
> The read_wkt(str1,p1) et (str2,p2) get the right polygon each time.
> The intersection(p1,p2,out) crashes only in the second case.
>
>
>
>
> It does not crash but reports an exception.
>
> Your second polygon POLYGON((6926 1523, 5926 -10976, 8426 -3476, -4073
> -10976, 3426 -5976, -4073 -976, 6926 1523)) is self-intersecting:
>
>
>
> The first intersection with this invalid polygon succeeds, because it
> probably happens to intersect it in a non-intersecting piece of it.
> Boost.Geometry does not checks self-intersectons before the process (for
> performance reasons). However, the second intersectoin is problematic, and
> then the polygons are checked on validity.
>
> Regards, Barend
>
>
>
>
>
> _______________________________________________
> Geometry mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4025098&i=0>
> http://lists.boost.org/mailman/listinfo.cgi/geometry
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://boost-geometry.203548.n3.nabble.com/overlay-invalid-input-exception-in-1-50-tp4025097p4025098.html
> To unsubscribe from overlay_invalid_input_exception in 1.50, click here<http://boost-geometry.203548.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4025097&code=Zm94YWRwYXRyZXNAZ21haWwuY29tfDQwMjUwOTd8MTkwMDMwMzkzMg==>
> .
> NAML<http://boost-geometry.203548.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
-- View this message in context: http://boost-geometry.203548.n3.nabble.com/overlay-invalid-input-exception-in-1-50-tp4025097p4025099.html Sent from the Boost Geometry mailing list archive at Nabble.com.
Geometry list run by mateusz at loskot.net