[
https://issues.apache.org/jira/browse/LUCENE-6487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14551293#comment-14551293
]
Karl Wright commented on LUCENE-6487:
-------------------------------------
Hmm.
Trying to introduce a random test for WGS84 using the same infrastructure as
for a SPHERE, and getting the following:
{code}
[junit4] 1> bbox=GeoSouthLatitudeZone:
{toplat=-1.5024863073176973(-86.08612418550003)}
[junit4] 1> spatialRect=Rect(minX=82.0,maxX=92.0,minY=-86.0,maxY=-72.0),
circleShape=Geo3dShape{planetmodel=PlanetModel: {a=1.0011188180710464,
b=1.0011188180710464, c=0.9977622539852008}, shape=GeoCircle:
{center=[X=0.026984641212903917, Y=0.06253120083527987, Z=-0.9954507743974911],
radius=1.1693705988362009(67.00000000000001)}}
[junit4] 1>
bboxshape=Rect(minX=-180.0,maxX=180.0,minY=-90.0,maxY=-86.07612418550002)
[junit4] FAILURE 0.17s | Geo3dWSG84ShapeRectRelationTest.testFailure <<<
[junit4] > Throwable #1: java.lang.AssertionError
[junit4] > at
__randomizedtesting.SeedInfo.seed([DEB9AAFD9D348562:B6045911A704E7CD]:0)
[junit4] > at
org.apache.lucene.spatial.spatial4j.Geo3dWSG84ShapeRectRelationTest.testFailure(Geo3dWSG84ShapeRectRelationTest.java:87)
{code}
The failure is because Spatial4j thinks for some reason that
bboxShape.relate(spatialRect) == SpatialRelation.DISJOINT, which is clearly not
the case, given:
{code}
spatialRect=Rect(minX=82.0,maxX=92.0,minY=-86.0,maxY=-72.0)
{code}
and
{code}
bboxshape=Rect(minX=-180.0,maxX=180.0,minY=-90.0,maxY=-86.07612418550002)
{code}
Need help from David Smiley...
> Add WGS84 capability to geo3d support
> -------------------------------------
>
> Key: LUCENE-6487
> URL: https://issues.apache.org/jira/browse/LUCENE-6487
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/spatial
> Reporter: Karl Wright
> Attachments: LUCENE-6487.patch
>
>
> WGS84 compatibility has been requested for geo3d. This involves working with
> an ellipsoid rather than a unit sphere. The general formula for an ellipsoid
> is:
> x^2/a^2 + y^2/b^2 + z^2/c^2 = 1
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]