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

Michael McCandless commented on LUCENE-7150:
--------------------------------------------

Hmm I'm adding polygon testing to the 6.1 M London, UK benchmark, but geo3d is 
angry with this:

{noformat}
POLY:
  lats=[51.14814672999999, 51.24200108694998, 51.22066806296021, 
51.07567472594126, 51.05429962903539, 51.14814672999999]
  lons=[-0.1104487519433594, -0.23263688084967538, -0.3629490615349049, 
-0.36288116612674665, -0.23263923846224235, -0.1104487519433594]
Exception in thread "main" java.lang.IllegalArgumentException: 
Degenerate/parallel vector constructed
        at org.apache.lucene.spatial3d.geom.Vector.<init>(Vector.java:77)
        at org.apache.lucene.spatial3d.geom.Plane.<init>(Plane.java:59)
        at 
org.apache.lucene.spatial3d.geom.SidedPlane.<init>(SidedPlane.java:48)
        at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.buildPolygonShape(GeoPolygonFactory.java:84)
        at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeGeoPolygon(GeoPolygonFactory.java:43)
        at 
org.apache.lucene.spatial3d.Geo3DPoint.newPolygonQuery(Geo3DPoint.java:119)
        at 
perf.IndexAndSearchOpenStreetMaps.queryIndex(IndexAndSearchOpenStreetMaps.java:339)
        at 
perf.IndexAndSearchOpenStreetMaps.main(IndexAndSearchOpenStreetMaps.java:525)
{noformat}

What does this mean...?

> geo3d public APIs should match the 2D apis?
> -------------------------------------------
>
>                 Key: LUCENE-7150
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7150
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>         Attachments: LUCENE-7150-sphere.patch, LUCENE-7150.patch, 
> LUCENE-7150.patch, LUCENE-7150.patch, LUCENE-7150.patch
>
>
> I'm struggling to benchmark the equivalent to 
> {{LatLonPoint.newDistanceQuery}} in the geo3d world.
> Ideally, I think we'd have a {{Geo3DPoint.newDistanceQuery}}?  And it would 
> take degrees, not radians, and radiusMeters, not an angle?
> And if I index and search using {{PlanetModel.SPHERE}} I think it should 
> ideally give the same results as {{LatLonPoint.newDistanceQuery}}, which uses 
> haversin.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to