[jira] [Commented] (SOLR-10045) Polygon Error: TopologyException: side location conflict

2017-01-27 Thread David Smiley (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-10045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15842857#comment-15842857
 ] 

David Smiley commented on SOLR-10045:
-

The "repairRule" applies universally (index & query) to polygons.  The 
Spatial4j related parameters are all universal to both.

> Polygon Error: TopologyException: side location conflict 
> -
>
> Key: SOLR-10045
> URL: https://issues.apache.org/jira/browse/SOLR-10045
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: spatial
>Affects Versions: 6.4
> Environment: ubuntu
>Reporter: samur araujo
>Assignee: David Smiley
>  Labels: spatial
>
> Hi all, solr is giving error when the polygon below is provided.
> The corresponding query in postgis does not return error.
> I guess the polygon is correct but JTS is complaining about it. Maybe some 
> parameter to quick fix it should be turned on at query time. 
> To test this issue, please use the polygon in a solr intersect query.
> The full stack-trace is below. 
> POSTGIS QUERY:
> select  geonameid from geoname where 
> ST_Contains(ST_GeomFromText('SRID=4326;MULTIPOLYGON (((32.30749900 
> 35., 32.30322300 35.00627900, 32.30219300 35.00780500, 32.29575000 
> 35.02125200, 32.27494400 35.04652800, 32.27330400 35.05730400, 32.27308300 
> 35.05883400, 32.27622200 35.08499900, 32.27739000 35.08961100, 32.27875100 
> 35.09480700, 32.28125000 35.09838900, 32.28766600 35.09852600, 32.29630700 
> 35.09372300, 32.30083500 35.09119400, 32.32822000 35.06766500, 32.34716800 
> 35.05444300, 32.36441800 35.04505500, 32.38013800 35.04085900, 32.39761000 
> 35.03883400, 32.40680700 35.03886000, 32.42580400 35.04222100, 32.44783400 
> 35.04938900, 32.4700 35.06508300, 32.48119400 35.07188800, 32.49261100 
> 35.08280600, 32.49597200 35.08602900, 32.50686300 35.09994500, 32.52422300 
> 35.13444500, 32.53080400 35.14286000, 32.54022200 35.15008200, 32.5495 
> 35.15719600, 32.55241800 35.16286100, 32.55305500 35.17233300, 32.55625200 
> 35.17433200, 32.56219500 35.17327900, 32.57241800 35.16808300, 32.57619500 
> 35.16869400, 32.57925000 35.16916700, 32.58097100 35.16944500, 32.58375200 
> 35.17050200, 32.60077700 35.17694500, 32.60519400 35.17686100, 32.61086300 
> 35.17677700, 32.61544400 35.17886000, 32.61644400 35.18019500, 32.62302800 
> 35.18891500, 32.62888700 35.18922000, 32.63694400 35.18644300, 32.65591800 
> 35.19411100, 32.66797300 35.19358400, 32.67680700 35.19175000, 32.69352700 
> 35.18502800, 32.71147200 35.18458200, 32.71505700 35.18366600, 32.73430600 
> 35.17863800, 32.7600 35.17780700, 32.74930600 35.17274900, 32.76791800 
> 35.16338700, 32.78491600 35.16033200, 32.80019400 35.15077600, 32.81186300 
> 35.14816700, 32.82375000 35.14255500, 32.83327900 35.14213900, 32.84858300 
> 35.14313900, 32.85455700 35.14527900, 32.87341700 35.15475100, 32.89905500 
> 35.16991800, 32.91033200 35.17661300, 32.91494400 35.18214000, 32.93172100 
> 35.2200, 32.93602800 35.24338900, 32.94211200 35.26694500, 32.94599900 
> 35.29358300, 32.94603000 35.31564000, 32.94352700 35.33736000, 32.94014000 
> 35.34524900, 32.93197300 35.35311100, 32.92986300 35.35897100, 32.93011100 
> 35.36550100, 32.93052700 35.37602600, 32.92911100 35.38744400, 32.92488900 
> 35.39897200, 32.92602900 35.40247300, 32.93452800 35.40127900, 32.95708500 
> 35.39183400, 32.99041700 35.37372200, 33.01625100 35.36166800, 33.02055700 
> 35.36202600, 33.03461100 35.36325100, 33.04089000 35.36194600, 33.05794500 
> 35.35475200, 33.07447100 35.35097100, 33.08872200 35.35141800, 33.09919400 
> 35.35377900, 33.11125200 35.35758200, 33.11927800 35.36280400, 33.12569400 
> 35.36311000, 33.16613800 35.35286000, 33.17822300 35.34977700, 33.22266800 
> 35.35488900, 33.23064000 35.34908300, 33.24366800 35.34738900, 33.24924900 
> 35.34352900, 33.25522200 35.34219400, 33.26564000 35.34544400, 33.27013800 
> 35.34541700, 33.28274900 35.34141500, 33.28802900 35.34191500, 33.29505500 
> 35.34544400, 33.31063800 35.34141500, 33.31758500 35.33961100, 33.34722100 
> 35.33663900, 33.36752700 35.33069600, 33.37966500 35.33308400, 33.40505600 
> 35.33058200, 33.46064000 35.33266800, 33.46213900 35.33230600, 33.46888700 
> 35.33075000, 33.48777800 35.33274800, 33.49741700 35.33525100, 33.51283300 
> 35.33503000, 33.53344300 35.34080500, 33.57466500 35.34425000, 33.61161000 
> 35.35486200, 33.61258300 35.35514100, 33.61883200 35.35355400, 33.62891800 
> 35.35355400, 33.64697300 35.35597200, 33.68272400 35.36580700, 33.70177800 
> 35.37444300, 33.71402700 35.38416700, 33.75102600 35.39963900, 33.77294500 
> 35.40877900, 33.78458400 35.41088900, 33.80305500 35.41122100, 33.82955600 
> 35.40866900, 33.83972200 35.41186100, 33.85691800 35.41027800, 

[jira] [Commented] (SOLR-10045) Polygon Error: TopologyException: side location conflict

2017-01-27 Thread samur araujo (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-10045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15842587#comment-15842587
 ] 

samur araujo commented on SOLR-10045:
-

Are the repair applied to query time? Are the repair applied in the polygon 
send in the query?

If I get it right, the repair is apply only at index time, on polygons that are 
being indexed, right?



> Polygon Error: TopologyException: side location conflict 
> -
>
> Key: SOLR-10045
> URL: https://issues.apache.org/jira/browse/SOLR-10045
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: spatial
>Affects Versions: 6.4
> Environment: ubuntu
>Reporter: samur araujo
>Assignee: David Smiley
>  Labels: spatial
>
> Hi all, solr is giving error when the polygon below is provided.
> The corresponding query in postgis does not return error.
> I guess the polygon is correct but JTS is complaining about it. Maybe some 
> parameter to quick fix it should be turned on at query time. 
> To test this issue, please use the polygon in a solr intersect query.
> The full stack-trace is below. 
> POSTGIS QUERY:
> select  geonameid from geoname where 
> ST_Contains(ST_GeomFromText('SRID=4326;MULTIPOLYGON (((32.30749900 
> 35., 32.30322300 35.00627900, 32.30219300 35.00780500, 32.29575000 
> 35.02125200, 32.27494400 35.04652800, 32.27330400 35.05730400, 32.27308300 
> 35.05883400, 32.27622200 35.08499900, 32.27739000 35.08961100, 32.27875100 
> 35.09480700, 32.28125000 35.09838900, 32.28766600 35.09852600, 32.29630700 
> 35.09372300, 32.30083500 35.09119400, 32.32822000 35.06766500, 32.34716800 
> 35.05444300, 32.36441800 35.04505500, 32.38013800 35.04085900, 32.39761000 
> 35.03883400, 32.40680700 35.03886000, 32.42580400 35.04222100, 32.44783400 
> 35.04938900, 32.4700 35.06508300, 32.48119400 35.07188800, 32.49261100 
> 35.08280600, 32.49597200 35.08602900, 32.50686300 35.09994500, 32.52422300 
> 35.13444500, 32.53080400 35.14286000, 32.54022200 35.15008200, 32.5495 
> 35.15719600, 32.55241800 35.16286100, 32.55305500 35.17233300, 32.55625200 
> 35.17433200, 32.56219500 35.17327900, 32.57241800 35.16808300, 32.57619500 
> 35.16869400, 32.57925000 35.16916700, 32.58097100 35.16944500, 32.58375200 
> 35.17050200, 32.60077700 35.17694500, 32.60519400 35.17686100, 32.61086300 
> 35.17677700, 32.61544400 35.17886000, 32.61644400 35.18019500, 32.62302800 
> 35.18891500, 32.62888700 35.18922000, 32.63694400 35.18644300, 32.65591800 
> 35.19411100, 32.66797300 35.19358400, 32.67680700 35.19175000, 32.69352700 
> 35.18502800, 32.71147200 35.18458200, 32.71505700 35.18366600, 32.73430600 
> 35.17863800, 32.7600 35.17780700, 32.74930600 35.17274900, 32.76791800 
> 35.16338700, 32.78491600 35.16033200, 32.80019400 35.15077600, 32.81186300 
> 35.14816700, 32.82375000 35.14255500, 32.83327900 35.14213900, 32.84858300 
> 35.14313900, 32.85455700 35.14527900, 32.87341700 35.15475100, 32.89905500 
> 35.16991800, 32.91033200 35.17661300, 32.91494400 35.18214000, 32.93172100 
> 35.2200, 32.93602800 35.24338900, 32.94211200 35.26694500, 32.94599900 
> 35.29358300, 32.94603000 35.31564000, 32.94352700 35.33736000, 32.94014000 
> 35.34524900, 32.93197300 35.35311100, 32.92986300 35.35897100, 32.93011100 
> 35.36550100, 32.93052700 35.37602600, 32.92911100 35.38744400, 32.92488900 
> 35.39897200, 32.92602900 35.40247300, 32.93452800 35.40127900, 32.95708500 
> 35.39183400, 32.99041700 35.37372200, 33.01625100 35.36166800, 33.02055700 
> 35.36202600, 33.03461100 35.36325100, 33.04089000 35.36194600, 33.05794500 
> 35.35475200, 33.07447100 35.35097100, 33.08872200 35.35141800, 33.09919400 
> 35.35377900, 33.11125200 35.35758200, 33.11927800 35.36280400, 33.12569400 
> 35.36311000, 33.16613800 35.35286000, 33.17822300 35.34977700, 33.22266800 
> 35.35488900, 33.23064000 35.34908300, 33.24366800 35.34738900, 33.24924900 
> 35.34352900, 33.25522200 35.34219400, 33.26564000 35.34544400, 33.27013800 
> 35.34541700, 33.28274900 35.34141500, 33.28802900 35.34191500, 33.29505500 
> 35.34544400, 33.31063800 35.34141500, 33.31758500 35.33961100, 33.34722100 
> 35.33663900, 33.36752700 35.33069600, 33.37966500 35.33308400, 33.40505600 
> 35.33058200, 33.46064000 35.33266800, 33.46213900 35.33230600, 33.46888700 
> 35.33075000, 33.48777800 35.33274800, 33.49741700 35.33525100, 33.51283300 
> 35.33503000, 33.53344300 35.34080500, 33.57466500 35.34425000, 33.61161000 
> 35.35486200, 33.61258300 35.35514100, 33.61883200 35.35355400, 33.62891800 
> 35.35355400, 33.64697300 35.35597200, 33.68272400 35.36580700, 33.70177800 
> 35.37444300, 33.71402700 35.38416700, 33.75102600 35.39963900, 33.77294500 
> 35.40877900, 33.78458400 35.41088900, 33.80305500 35.41122100, 33.82955600 

[jira] [Commented] (SOLR-10045) Polygon Error: TopologyException: side location conflict

2017-01-26 Thread David Smiley (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-10045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15839872#comment-15839872
 ] 

David Smiley commented on SOLR-10045:
-

Then repairConvexHull very likely will, although it'll unfortunately expand the 
bounds of the shape a lot.

> Polygon Error: TopologyException: side location conflict 
> -
>
> Key: SOLR-10045
> URL: https://issues.apache.org/jira/browse/SOLR-10045
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: spatial
>Affects Versions: 6.4.0
> Environment: ubuntu
>Reporter: samur araujo
>Assignee: David Smiley
>  Labels: spatial
>
> Hi all, solr is giving error when the polygon below is provided.
> The corresponding query in postgis does not return error.
> I guess the polygon is correct but JTS is complaining about it. Maybe some 
> parameter to quick fix it should be turned on at query time. 
> To test this issue, please use the polygon in a solr intersect query.
> The full stack-trace is below. 
> POSTGIS QUERY:
> select  geonameid from geoname where 
> ST_Contains(ST_GeomFromText('SRID=4326;MULTIPOLYGON (((32.30749900 
> 35., 32.30322300 35.00627900, 32.30219300 35.00780500, 32.29575000 
> 35.02125200, 32.27494400 35.04652800, 32.27330400 35.05730400, 32.27308300 
> 35.05883400, 32.27622200 35.08499900, 32.27739000 35.08961100, 32.27875100 
> 35.09480700, 32.28125000 35.09838900, 32.28766600 35.09852600, 32.29630700 
> 35.09372300, 32.30083500 35.09119400, 32.32822000 35.06766500, 32.34716800 
> 35.05444300, 32.36441800 35.04505500, 32.38013800 35.04085900, 32.39761000 
> 35.03883400, 32.40680700 35.03886000, 32.42580400 35.04222100, 32.44783400 
> 35.04938900, 32.4700 35.06508300, 32.48119400 35.07188800, 32.49261100 
> 35.08280600, 32.49597200 35.08602900, 32.50686300 35.09994500, 32.52422300 
> 35.13444500, 32.53080400 35.14286000, 32.54022200 35.15008200, 32.5495 
> 35.15719600, 32.55241800 35.16286100, 32.55305500 35.17233300, 32.55625200 
> 35.17433200, 32.56219500 35.17327900, 32.57241800 35.16808300, 32.57619500 
> 35.16869400, 32.57925000 35.16916700, 32.58097100 35.16944500, 32.58375200 
> 35.17050200, 32.60077700 35.17694500, 32.60519400 35.17686100, 32.61086300 
> 35.17677700, 32.61544400 35.17886000, 32.61644400 35.18019500, 32.62302800 
> 35.18891500, 32.62888700 35.18922000, 32.63694400 35.18644300, 32.65591800 
> 35.19411100, 32.66797300 35.19358400, 32.67680700 35.19175000, 32.69352700 
> 35.18502800, 32.71147200 35.18458200, 32.71505700 35.18366600, 32.73430600 
> 35.17863800, 32.7600 35.17780700, 32.74930600 35.17274900, 32.76791800 
> 35.16338700, 32.78491600 35.16033200, 32.80019400 35.15077600, 32.81186300 
> 35.14816700, 32.82375000 35.14255500, 32.83327900 35.14213900, 32.84858300 
> 35.14313900, 32.85455700 35.14527900, 32.87341700 35.15475100, 32.89905500 
> 35.16991800, 32.91033200 35.17661300, 32.91494400 35.18214000, 32.93172100 
> 35.2200, 32.93602800 35.24338900, 32.94211200 35.26694500, 32.94599900 
> 35.29358300, 32.94603000 35.31564000, 32.94352700 35.33736000, 32.94014000 
> 35.34524900, 32.93197300 35.35311100, 32.92986300 35.35897100, 32.93011100 
> 35.36550100, 32.93052700 35.37602600, 32.92911100 35.38744400, 32.92488900 
> 35.39897200, 32.92602900 35.40247300, 32.93452800 35.40127900, 32.95708500 
> 35.39183400, 32.99041700 35.37372200, 33.01625100 35.36166800, 33.02055700 
> 35.36202600, 33.03461100 35.36325100, 33.04089000 35.36194600, 33.05794500 
> 35.35475200, 33.07447100 35.35097100, 33.08872200 35.35141800, 33.09919400 
> 35.35377900, 33.11125200 35.35758200, 33.11927800 35.36280400, 33.12569400 
> 35.36311000, 33.16613800 35.35286000, 33.17822300 35.34977700, 33.22266800 
> 35.35488900, 33.23064000 35.34908300, 33.24366800 35.34738900, 33.24924900 
> 35.34352900, 33.25522200 35.34219400, 33.26564000 35.34544400, 33.27013800 
> 35.34541700, 33.28274900 35.34141500, 33.28802900 35.34191500, 33.29505500 
> 35.34544400, 33.31063800 35.34141500, 33.31758500 35.33961100, 33.34722100 
> 35.33663900, 33.36752700 35.33069600, 33.37966500 35.33308400, 33.40505600 
> 35.33058200, 33.46064000 35.33266800, 33.46213900 35.33230600, 33.46888700 
> 35.33075000, 33.48777800 35.33274800, 33.49741700 35.33525100, 33.51283300 
> 35.33503000, 33.53344300 35.34080500, 33.57466500 35.34425000, 33.61161000 
> 35.35486200, 33.61258300 35.35514100, 33.61883200 35.35355400, 33.62891800 
> 35.35355400, 33.64697300 35.35597200, 33.68272400 35.36580700, 33.70177800 
> 35.37444300, 33.71402700 35.38416700, 33.75102600 35.39963900, 33.77294500 
> 35.40877900, 33.78458400 35.41088900, 33.80305500 35.41122100, 33.82955600 
> 35.40866900, 33.83972200 35.41186100, 33.85691800 35.41027800, 33.89386000 
> 

[jira] [Commented] (SOLR-10045) Polygon Error: TopologyException: side location conflict

2017-01-26 Thread samur araujo (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-10045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15839870#comment-15839870
 ] 

samur araujo commented on SOLR-10045:
-

My schema has set validationRule="repairBuffer0". It seems not to fix this 
problem.

> Polygon Error: TopologyException: side location conflict 
> -
>
> Key: SOLR-10045
> URL: https://issues.apache.org/jira/browse/SOLR-10045
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: spatial
>Affects Versions: 6.4.0
> Environment: ubuntu
>Reporter: samur araujo
>Assignee: David Smiley
>  Labels: spatial
>
> Hi all, solr is giving error when the polygon below is provided.
> The corresponding query in postgis does not return error.
> I guess the polygon is correct but JTS is complaining about it. Maybe some 
> parameter to quick fix it should be turned on at query time. 
> To test this issue, please use the polygon in a solr intersect query.
> The full stack-trace is below. 
> POSTGIS QUERY:
> select  geonameid from geoname where 
> ST_Contains(ST_GeomFromText('SRID=4326;MULTIPOLYGON (((32.30749900 
> 35., 32.30322300 35.00627900, 32.30219300 35.00780500, 32.29575000 
> 35.02125200, 32.27494400 35.04652800, 32.27330400 35.05730400, 32.27308300 
> 35.05883400, 32.27622200 35.08499900, 32.27739000 35.08961100, 32.27875100 
> 35.09480700, 32.28125000 35.09838900, 32.28766600 35.09852600, 32.29630700 
> 35.09372300, 32.30083500 35.09119400, 32.32822000 35.06766500, 32.34716800 
> 35.05444300, 32.36441800 35.04505500, 32.38013800 35.04085900, 32.39761000 
> 35.03883400, 32.40680700 35.03886000, 32.42580400 35.04222100, 32.44783400 
> 35.04938900, 32.4700 35.06508300, 32.48119400 35.07188800, 32.49261100 
> 35.08280600, 32.49597200 35.08602900, 32.50686300 35.09994500, 32.52422300 
> 35.13444500, 32.53080400 35.14286000, 32.54022200 35.15008200, 32.5495 
> 35.15719600, 32.55241800 35.16286100, 32.55305500 35.17233300, 32.55625200 
> 35.17433200, 32.56219500 35.17327900, 32.57241800 35.16808300, 32.57619500 
> 35.16869400, 32.57925000 35.16916700, 32.58097100 35.16944500, 32.58375200 
> 35.17050200, 32.60077700 35.17694500, 32.60519400 35.17686100, 32.61086300 
> 35.17677700, 32.61544400 35.17886000, 32.61644400 35.18019500, 32.62302800 
> 35.18891500, 32.62888700 35.18922000, 32.63694400 35.18644300, 32.65591800 
> 35.19411100, 32.66797300 35.19358400, 32.67680700 35.19175000, 32.69352700 
> 35.18502800, 32.71147200 35.18458200, 32.71505700 35.18366600, 32.73430600 
> 35.17863800, 32.7600 35.17780700, 32.74930600 35.17274900, 32.76791800 
> 35.16338700, 32.78491600 35.16033200, 32.80019400 35.15077600, 32.81186300 
> 35.14816700, 32.82375000 35.14255500, 32.83327900 35.14213900, 32.84858300 
> 35.14313900, 32.85455700 35.14527900, 32.87341700 35.15475100, 32.89905500 
> 35.16991800, 32.91033200 35.17661300, 32.91494400 35.18214000, 32.93172100 
> 35.2200, 32.93602800 35.24338900, 32.94211200 35.26694500, 32.94599900 
> 35.29358300, 32.94603000 35.31564000, 32.94352700 35.33736000, 32.94014000 
> 35.34524900, 32.93197300 35.35311100, 32.92986300 35.35897100, 32.93011100 
> 35.36550100, 32.93052700 35.37602600, 32.92911100 35.38744400, 32.92488900 
> 35.39897200, 32.92602900 35.40247300, 32.93452800 35.40127900, 32.95708500 
> 35.39183400, 32.99041700 35.37372200, 33.01625100 35.36166800, 33.02055700 
> 35.36202600, 33.03461100 35.36325100, 33.04089000 35.36194600, 33.05794500 
> 35.35475200, 33.07447100 35.35097100, 33.08872200 35.35141800, 33.09919400 
> 35.35377900, 33.11125200 35.35758200, 33.11927800 35.36280400, 33.12569400 
> 35.36311000, 33.16613800 35.35286000, 33.17822300 35.34977700, 33.22266800 
> 35.35488900, 33.23064000 35.34908300, 33.24366800 35.34738900, 33.24924900 
> 35.34352900, 33.25522200 35.34219400, 33.26564000 35.34544400, 33.27013800 
> 35.34541700, 33.28274900 35.34141500, 33.28802900 35.34191500, 33.29505500 
> 35.34544400, 33.31063800 35.34141500, 33.31758500 35.33961100, 33.34722100 
> 35.33663900, 33.36752700 35.33069600, 33.37966500 35.33308400, 33.40505600 
> 35.33058200, 33.46064000 35.33266800, 33.46213900 35.33230600, 33.46888700 
> 35.33075000, 33.48777800 35.33274800, 33.49741700 35.33525100, 33.51283300 
> 35.33503000, 33.53344300 35.34080500, 33.57466500 35.34425000, 33.61161000 
> 35.35486200, 33.61258300 35.35514100, 33.61883200 35.35355400, 33.62891800 
> 35.35355400, 33.64697300 35.35597200, 33.68272400 35.36580700, 33.70177800 
> 35.37444300, 33.71402700 35.38416700, 33.75102600 35.39963900, 33.77294500 
> 35.40877900, 33.78458400 35.41088900, 33.80305500 35.41122100, 33.82955600 
> 35.40866900, 33.83972200 35.41186100, 33.85691800 35.41027800, 33.89386000 
> 35.41999800, 33.89902900 

[jira] [Commented] (SOLR-10045) Polygon Error: TopologyException: side location conflict

2017-01-26 Thread David Smiley (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-10045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15839836#comment-15839836
 ] 

David Smiley commented on SOLR-10045:
-

The polygon must be "valid", which among other conditions means edges can't 
cross each other.  JTS has a GUI tool "TestBuilder" (I think) that can help 
identify where this is occurring.  To work around this, set 
validationRule="repairBuffer0"
http://locationtech.github.io/spatial4j/apidocs/org/locationtech/spatial4j/context/jts/ValidationRule.html

> Polygon Error: TopologyException: side location conflict 
> -
>
> Key: SOLR-10045
> URL: https://issues.apache.org/jira/browse/SOLR-10045
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: spatial
>Affects Versions: 6.4.0
> Environment: ubuntu
>Reporter: samur araujo
>Assignee: David Smiley
>  Labels: spatial
>
> Hi all, solr is giving error when the polygon below is provided.
> The corresponding query in postgis does not return error.
> I guess the polygon is correct but JTS is complaining about it. Maybe some 
> parameter to quick fix it should be turned on at query time. 
> To test this issue, please use the polygon in a solr intersect query.
> The full stack-trace is below. 
> POSTGIS QUERY:
> select  geonameid from geoname where 
> ST_Contains(ST_GeomFromText('SRID=4326;MULTIPOLYGON (((32.30749900 
> 35., 32.30322300 35.00627900, 32.30219300 35.00780500, 32.29575000 
> 35.02125200, 32.27494400 35.04652800, 32.27330400 35.05730400, 32.27308300 
> 35.05883400, 32.27622200 35.08499900, 32.27739000 35.08961100, 32.27875100 
> 35.09480700, 32.28125000 35.09838900, 32.28766600 35.09852600, 32.29630700 
> 35.09372300, 32.30083500 35.09119400, 32.32822000 35.06766500, 32.34716800 
> 35.05444300, 32.36441800 35.04505500, 32.38013800 35.04085900, 32.39761000 
> 35.03883400, 32.40680700 35.03886000, 32.42580400 35.04222100, 32.44783400 
> 35.04938900, 32.4700 35.06508300, 32.48119400 35.07188800, 32.49261100 
> 35.08280600, 32.49597200 35.08602900, 32.50686300 35.09994500, 32.52422300 
> 35.13444500, 32.53080400 35.14286000, 32.54022200 35.15008200, 32.5495 
> 35.15719600, 32.55241800 35.16286100, 32.55305500 35.17233300, 32.55625200 
> 35.17433200, 32.56219500 35.17327900, 32.57241800 35.16808300, 32.57619500 
> 35.16869400, 32.57925000 35.16916700, 32.58097100 35.16944500, 32.58375200 
> 35.17050200, 32.60077700 35.17694500, 32.60519400 35.17686100, 32.61086300 
> 35.17677700, 32.61544400 35.17886000, 32.61644400 35.18019500, 32.62302800 
> 35.18891500, 32.62888700 35.18922000, 32.63694400 35.18644300, 32.65591800 
> 35.19411100, 32.66797300 35.19358400, 32.67680700 35.19175000, 32.69352700 
> 35.18502800, 32.71147200 35.18458200, 32.71505700 35.18366600, 32.73430600 
> 35.17863800, 32.7600 35.17780700, 32.74930600 35.17274900, 32.76791800 
> 35.16338700, 32.78491600 35.16033200, 32.80019400 35.15077600, 32.81186300 
> 35.14816700, 32.82375000 35.14255500, 32.83327900 35.14213900, 32.84858300 
> 35.14313900, 32.85455700 35.14527900, 32.87341700 35.15475100, 32.89905500 
> 35.16991800, 32.91033200 35.17661300, 32.91494400 35.18214000, 32.93172100 
> 35.2200, 32.93602800 35.24338900, 32.94211200 35.26694500, 32.94599900 
> 35.29358300, 32.94603000 35.31564000, 32.94352700 35.33736000, 32.94014000 
> 35.34524900, 32.93197300 35.35311100, 32.92986300 35.35897100, 32.93011100 
> 35.36550100, 32.93052700 35.37602600, 32.92911100 35.38744400, 32.92488900 
> 35.39897200, 32.92602900 35.40247300, 32.93452800 35.40127900, 32.95708500 
> 35.39183400, 32.99041700 35.37372200, 33.01625100 35.36166800, 33.02055700 
> 35.36202600, 33.03461100 35.36325100, 33.04089000 35.36194600, 33.05794500 
> 35.35475200, 33.07447100 35.35097100, 33.08872200 35.35141800, 33.09919400 
> 35.35377900, 33.11125200 35.35758200, 33.11927800 35.36280400, 33.12569400 
> 35.36311000, 33.16613800 35.35286000, 33.17822300 35.34977700, 33.22266800 
> 35.35488900, 33.23064000 35.34908300, 33.24366800 35.34738900, 33.24924900 
> 35.34352900, 33.25522200 35.34219400, 33.26564000 35.34544400, 33.27013800 
> 35.34541700, 33.28274900 35.34141500, 33.28802900 35.34191500, 33.29505500 
> 35.34544400, 33.31063800 35.34141500, 33.31758500 35.33961100, 33.34722100 
> 35.33663900, 33.36752700 35.33069600, 33.37966500 35.33308400, 33.40505600 
> 35.33058200, 33.46064000 35.33266800, 33.46213900 35.33230600, 33.46888700 
> 35.33075000, 33.48777800 35.33274800, 33.49741700 35.33525100, 33.51283300 
> 35.33503000, 33.53344300 35.34080500, 33.57466500 35.34425000, 33.61161000 
> 35.35486200, 33.61258300 35.35514100, 33.61883200 35.35355400, 33.62891800 
> 35.35355400, 33.64697300 35.35597200, 33.68272400 35.36580700, 33.70177800 
> 

[jira] [Commented] (SOLR-10045) Polygon Error: TopologyException: side location conflict

2017-01-26 Thread samur araujo (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-10045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15839804#comment-15839804
 ] 

samur araujo commented on SOLR-10045:
-

Here is the JTS reaction to the polygon.

package com.geophy.shapes.util;

import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.io.WKTReader;
import com.vividsolutions.jts.operation.valid.IsValidOp;

public class WktTest {

public static void main(String[] args) throws Exception {
String string = "MULTIPOLYGON (((32.30749900 35., 
32.30322300 35.00627900, 32.30219300 35.00780500, 32.29575000 35.02125200, 
32.27494400 35.04652800, 32.27330400 35.05730400, 32.27308300 35.05883400, 
32.27622200 35.08499900, 32.27739000 35.08961100, 32.27875100 35.09480700, 
32.28125000 35.09838900, 32.28766600 35.09852600, 32.29630700 35.09372300, 
32.30083500 35.09119400, 32.32822000 35.06766500, 32.34716800 35.05444300, 
32.36441800 35.04505500, 32.38013800 35.04085900, 32.39761000 35.03883400, 
32.40680700 35.03886000, 32.42580400 35.04222100, 32.44783400 35.04938900, 
32.4700 35.06508300, 32.48119400 35.07188800, 32.49261100 35.08280600, 
32.49597200 35.08602900, 32.50686300 35.09994500, 32.52422300 35.13444500, 
32.53080400 35.14286000, 32.54022200 35.15008200, 32.5495 35.15719600, 
32.55241800 35.16286100, 32.55305500 35.17233300, 32.55625200 35.17433200, 
32.56219500 35.17327900, 32.57241800 35.16808300, 32.57619500 35.16869400, 
32.57925000 35.16916700, 32.58097100 35.16944500, 32.58375200 35.17050200, 
32.60077700 35.17694500, 32.60519400 35.17686100, 32.61086300 35.17677700, 
32.61544400 35.17886000, 32.61644400 35.18019500, 32.62302800 35.18891500, 
32.62888700 35.18922000, 32.63694400 35.18644300, 32.65591800 35.19411100, 
32.66797300 35.19358400, 32.67680700 35.19175000, 32.69352700 35.18502800, 
32.71147200 35.18458200, 32.71505700 35.18366600, 32.73430600 35.17863800, 
32.7600 35.17780700, 32.74930600 35.17274900, 32.76791800 35.16338700, 
32.78491600 35.16033200, 32.80019400 35.15077600, 32.81186300 35.14816700, 
32.82375000 35.14255500, 32.83327900 35.14213900, 32.84858300 35.14313900, 
32.85455700 35.14527900, 32.87341700 35.15475100, 32.89905500 35.16991800, 
32.91033200 35.17661300, 32.91494400 35.18214000, 32.93172100 35.2200, 
32.93602800 35.24338900, 32.94211200 35.26694500, 32.94599900 35.29358300, 
32.94603000 35.31564000, 32.94352700 35.33736000, 32.94014000 35.34524900, 
32.93197300 35.35311100, 32.92986300 35.35897100, 32.93011100 35.36550100, 
32.93052700 35.37602600, 32.92911100 35.38744400, 32.92488900 35.39897200, 
32.92602900 35.40247300, 32.93452800 35.40127900, 32.95708500 35.39183400, 
32.99041700 35.37372200, 33.01625100 35.36166800, 33.02055700 35.36202600, 
33.03461100 35.36325100, 33.04089000 35.36194600, 33.05794500 35.35475200, 
33.07447100 35.35097100, 33.08872200 35.35141800, 33.09919400 35.35377900, 
33.11125200 35.35758200, 33.11927800 35.36280400, 33.12569400 35.36311000, 
33.16613800 35.35286000, 33.17822300 35.34977700, 33.22266800 35.35488900, 
33.23064000 35.34908300, 33.24366800 35.34738900, 33.24924900 35.34352900, 
33.25522200 35.34219400, 33.26564000 35.34544400, 33.27013800 35.34541700, 
33.28274900 35.34141500, 33.28802900 35.34191500, 33.29505500 35.34544400, 
33.31063800 35.34141500, 33.31758500 35.33961100, 33.34722100 35.33663900, 
33.36752700 35.33069600, 33.37966500 35.33308400, 33.40505600 35.33058200, 
33.46064000 35.33266800, 33.46213900 35.33230600, 33.46888700 35.33075000, 
33.48777800 35.33274800, 33.49741700 35.33525100, 33.51283300 35.33503000, 
33.53344300 35.34080500, 33.57466500 35.34425000, 33.61161000 35.35486200, 
33.61258300 35.35514100, 33.61883200 35.35355400, 33.62891800 35.35355400, 
33.64697300 35.35597200, 33.68272400 35.36580700, 33.70177800 35.37444300, 
33.71402700 35.38416700, 33.75102600 35.39963900, 33.77294500 35.40877900, 
33.78458400 35.41088900, 33.80305500 35.41122100, 33.82955600 35.40866900, 
33.83972200 35.41186100, 33.85691800 35.41027800, 33.89386000 35.41999800, 
33.89902900 35.42136000, 33.90047100 35.42174900, 33.9200 35.42861200, 
33.95633300 35.43811000, 33.9730 35.44041800, 33.98458500 35.44363800, 
34.04130600 35.46816600, 34.07719400 35.48363900, 34.09088900 35.49344600, 
34.11047400 35.49861100, 34.12933400 35.50694300, 34.15166900 35.52736300, 
34.16341800 35.54055400, 34.16480600 35.54213700, 34.17514000 35.54758500, 
34.18066800 35.55400100, 34.18266700 35.56280500, 34.18794600 35.56347300, 
34.19513700 35.56069600, 34.20461300 35.55702600, 34.21216600 35.55730400, 
34.21788800 35.56030700, 34.22124900 35.55583200, 34.2295 35.55869300, 
34.23658400 35.55758300, 34.23802900 35.55833400, 34.24386200 35.56139000, 
34.24747100 35.56327800, 34.24913800 35.56464000, 34.25683200 35.57099900, 
34.27527600 35.57241800, 34.28511000 35.57713700, 34.28733400 35.57711000, 
34.29719500 35.57691600, 34.30458400