You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by rgamarra <rg...@gmail.com> on 2017/06/05 00:41:06 UTC
polygon self-crossing
Hi there all,
I'm using the RPT field type to perform geospatial polygonal searches (e.g.
https://cwiki.apache.org/confluence/display/solr/Spatial+Search)/
How do you recommend with self-crossing polygons (8 figure or bow-tie, for
example)?
Decompose it in a multi polygon? Setting to "none" validation rule: in what
cases the unexpected behavior arises?
or, configure different validation rules at the schema level?
According to https://lucene.apache.org/core/6_2_0/core/org/apache/
lucene/geo/Polygon.html
1. The polygon must not be self-crossing, otherwise may result in
unexpected behavior.
The expected behavior of the search is that of searching for points in each
of the lobes of the 8 figure, for the example given.
Best regards
--
Rodolfo Federico Gamarra
Re: polygon self-crossing
Posted by rgamarra <rg...@gmail.com>.
Sorry, I'd like to add further information regarding the validation rule.
My question comes because of what's said in the doc link at the bottom.
What kind of unexpected behavior can happen?
none
Geometries will not be validated (because it's kinda expensive to
calculate). You may or may not ultimately get an error at some point;
results are undefined.
https://locationtech.github.io/spatial4j/apidocs/com/
spatial4j/core/context/jts/ValidationRule.html
--
Rodolfo Federico Gamarra
On Sun, Jun 4, 2017 at 9:41 PM, rgamarra <rg...@gmail.com> wrote:
> Hi there all,
>
> I'm using the RPT field type to perform geospatial polygonal searches
> (e.g. https://cwiki.apache.org/confluence/display/solr/Spatial+Search)/
>
> How do you recommend with self-crossing polygons (8 figure or bow-tie, for
> example)?
>
> Decompose it in a multi polygon? Setting to "none" validation rule: in
> what cases the unexpected behavior arises?
>
> or, configure different validation rules at the schema level?
>
> According to https://lucene.apache.org/core/6_2_0/core/org/apache/lucene/
> geo/Polygon.html
>
> 1. The polygon must not be self-crossing, otherwise may result in
> unexpected behavior.
>
> The expected behavior of the search is that of searching for points in
> each of the lobes of the 8 figure, for the example given.
>
> Best regards
>
>
> --
> Rodolfo Federico Gamarra
>
Re: polygon self-crossing
Posted by rgamarra <rg...@gmail.com>.
Thanks for prompt answer.
Any recommendation to perform that operation in java?
The different simplify @ jst don't work as expected (eg they lose one of
lobes).
Best
On Jun 4, 2017 9:54 PM, "Nitin Kumar" <ni...@gmail.com> wrote:
> Yes, decompose into multi polygon.
>
> On 05-Jun-2017 6:11 AM, "rgamarra" <rg...@gmail.com> wrote:
>
> > Hi there all,
> >
> > I'm using the RPT field type to perform geospatial polygonal searches
> (e.g.
> > https://cwiki.apache.org/confluence/display/solr/Spatial+Search)/
> >
> > How do you recommend with self-crossing polygons (8 figure or bow-tie,
> for
> > example)?
> >
> > Decompose it in a multi polygon? Setting to "none" validation rule: in
> what
> > cases the unexpected behavior arises?
> >
> > or, configure different validation rules at the schema level?
> >
> > According to https://lucene.apache.org/core/6_2_0/core/org/apache/
> > lucene/geo/Polygon.html
> >
> > 1. The polygon must not be self-crossing, otherwise may result in
> > unexpected behavior.
> >
> > The expected behavior of the search is that of searching for points in
> each
> > of the lobes of the 8 figure, for the example given.
> >
> > Best regards
> >
> >
> > --
> > Rodolfo Federico Gamarra
> >
>
Re: polygon self-crossing
Posted by Nitin Kumar <ni...@gmail.com>.
Yes, decompose into multi polygon.
On 05-Jun-2017 6:11 AM, "rgamarra" <rg...@gmail.com> wrote:
> Hi there all,
>
> I'm using the RPT field type to perform geospatial polygonal searches (e.g.
> https://cwiki.apache.org/confluence/display/solr/Spatial+Search)/
>
> How do you recommend with self-crossing polygons (8 figure or bow-tie, for
> example)?
>
> Decompose it in a multi polygon? Setting to "none" validation rule: in what
> cases the unexpected behavior arises?
>
> or, configure different validation rules at the schema level?
>
> According to https://lucene.apache.org/core/6_2_0/core/org/apache/
> lucene/geo/Polygon.html
>
> 1. The polygon must not be self-crossing, otherwise may result in
> unexpected behavior.
>
> The expected behavior of the search is that of searching for points in each
> of the lobes of the 8 figure, for the example given.
>
> Best regards
>
>
> --
> Rodolfo Federico Gamarra
>