[ 
https://issues.apache.org/jira/browse/LUCENE-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237208#comment-16237208
 ] 

Karl Wright commented on LUCENE-8032:
-------------------------------------

Thanks, [~ivera], for the clarification.  I was trying to be sure I wasn't 
missing something important.

Yes, the problem is that the "polygon" would be concave, and that would make it 
impossible to properly represent with the same logic.

As for your other suggestion: the planes used to construct the exact circle 
approximation do *not* go through the center of the earth.  Thus, the shape is 
not a true polygon, as Geo3D describes it.  The choice of planes allows far 
fewer to be used than you would need if you implemented the exact circle with 
true polygon (great circle) edges.  The first thing I did was figure out how 
many planes would be needed for a good approximation, and found that number to 
be acceptably low.  The fact that planes are not true polygon edges also means 
that the complex crossing-counting logic found in ComplexPolygon would not work.


> Test failed: RandomGeoShapeRelationshipTest.testRandomContains
> --------------------------------------------------------------
>
>                 Key: LUCENE-8032
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8032
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial3d
>            Reporter: David Smiley
>            Assignee: Karl Wright
>            Priority: Minor
>             Fix For: 6.7, master (8.0), 7.2
>
>         Attachments: LUCENE-8032.patch
>
>
> https://jenkins.thetaphi.de/job/Lucene-Solr-master-Linux/20800/
> {noformat}
> Error Message:
> geoAreaShape: GeoExactCircle: {planetmodel=PlanetModel.WGS84, 
> center=[lat=-0.00871130560892533, 
> lon=2.3029626482941588([X=-0.6692047265792528, Y=0.7445316825911176, 
> Z=-0.008720939756154669])], radius=3.038428918538668(174.0891533827647), 
> accuracy=2.111101444186927E-4} shape: GeoRectangle: 
> {planetmodel=PlanetModel.WGS84, 
> toplat=0.18851664435052304(10.801208089253723), 
> bottomlat=-1.4896034997154073(-85.34799368160976), 
> leftlon=-1.4970589804391838(-85.7751612613233), 
> rightlon=1.346321571653886(77.13854392318753)} expected:<0> but was:<2>
> Stack Trace:
> java.lang.AssertionError: geoAreaShape: GeoExactCircle: 
> {planetmodel=PlanetModel.WGS84, center=[lat=-0.00871130560892533, 
> lon=2.3029626482941588([X=-0.6692047265792528, Y=0.7445316825911176, 
> Z=-0.008720939756154669])], radius=3.038428918538668(174.0891533827647), 
> accuracy=2.111101444186927E-4}
> shape: GeoRectangle: {planetmodel=PlanetModel.WGS84, 
> toplat=0.18851664435052304(10.801208089253723), 
> bottomlat=-1.4896034997154073(-85.34799368160976), 
> leftlon=-1.4970589804391838(-85.7751612613233), 
> rightlon=1.346321571653886(77.13854392318753)} expected:<0> but was:<2>
>         at 
> __randomizedtesting.SeedInfo.seed([87612C9805977C6F:B087E212A0C8DB25]:0)
>         at org.junit.Assert.fail(Assert.java:93)
>         at org.junit.Assert.failNotEquals(Assert.java:647)
>         at org.junit.Assert.assertEquals(Assert.java:128)
>         at org.junit.Assert.assertEquals(Assert.java:472)
>         at 
> org.apache.lucene.spatial3d.geom.RandomGeoShapeRelationshipTest.testRandomContains(RandomGeoShapeRelationshipTest.java:225)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to