# Geometry :

Subject: Re: [geometry] [Search Point in MultiPolygon]
From: Ederson de Moura (ederbsd_at_[hidden])
Date: 2013-08-06 18:36:12

Hi Barend,

Worked perfectly now! Using covered_by.

Thank you!

Regards,

EDM.

On 5 August 2013 13:22, Barend Gehrels <barend_at_[hidden]> wrote:

> Hi,
>
>
>
> On 5-8-2013 17:17, Ederson de Moura wrote:
>
>> Hello guys,
>>
>> I need to find a point within "MultiPolygon". I'm trying to apply the
>> same logic of the "polygon" example:
>>

>> geometry/reference/algorithms/**within/within_2.html<http://www.boost.org/doc/libs/1_54_0/libs/geometry/doc/html/geometry/reference/algorithms/within/within_2.html>
>>
>> But not to the point the result is always not found. Could someone help
>> me?
>>
>>
>> boost::geometry::read_wkt( "MULTIPOLYGON(((0 0, 0 10, 10 10, 10 0, 0
>> 0)), ((10 5, 10 15, 20 15, 20 5, 10 5)))", p_multi );
>>
>> int x = 10;
>> int y = 10;
>>
>
>
> Your point is a cornerpoint of the specified multi-polygon. So it is not
> "within". You can use covered_by to detect if a point is
> within-or-on-the-border of a (multi)polygon.
>
> Regards, Barend
>
>
> ______________________________**_________________
> Geometry mailing list
> Geometry_at_[hidden]

>

```--
Ederson de Moura
http://sites.google.com/site/edersondemoura/
```

Geometry list run by mateusz at loskot.net