You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Karl Wright (JIRA)" <ji...@apache.org> on 2016/04/08 13:32:25 UTC

[jira] [Commented] (LUCENE-7192) Geo3d polygon creation should not get upset about co-linear points

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

Karl Wright commented on LUCENE-7192:
-------------------------------------

Here's an example of the kind of exception that gets thrown:

{code}
   [junit4] Suite: org.apache.lucene.spatial3d.TestGeo3DPoint
   [junit4] IGNOR/A 0.01s J0 | TestGeo3DPoint.testRandomBig
   [junit4]    > Assumption #1: 'nightly' test group is disabled (@Nightly())
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestGeo3DPoint -Dtests.method=testRandomMedium -Dtests.seed=EECA345C8B103349 -Dtests.slow=true -Dtests.locale=ar-DZ -Dtests.timezone=America/Porto_Acre -Dtests.asserts=true -Dtests.file.encoding=Cp1252
   [junit4] ERROR   2.49s J0 | TestGeo3DPoint.testRandomMedium <<<
   [junit4]    > Throwable #1: java.lang.IllegalArgumentException: Cannot determine sidedness because check point is on plane.
   [junit4]    >        at __randomizedtesting.SeedInfo.seed([EECA345C8B103349:531403F4CA75502F]:0)
   [junit4]    >        at org.apache.lucene.spatial3d.geom.SidedPlane.<init>(SidedPlane.java:67)
   [junit4]    >        at org.apache.lucene.spatial3d.geom.GeoPolygonFactory$EdgeBuffer.<init>(GeoPolygonFactory.java:949)
   [junit4]    >        at org.apache.lucene.spatial3d.geom.GeoPolygonFactory.buildPolygonShape(GeoPolygonFactory.java:337)
   [junit4]    >        at org.apache.lucene.spatial3d.geom.GeoPolygonFactory.buildPolygonShape(GeoPolygonFactory.java:477)
   [junit4]    >        at org.apache.lucene.spatial3d.geom.GeoPolygonFactory.buildPolygonShape(GeoPolygonFactory.java:451)
   [junit4]    >        at org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeGeoPolygon(GeoPolygonFactory.java:151)
   [junit4]    >        at org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeGeoPolygon(GeoPolygonFactory.java:119)
   [junit4]    >        at org.apache.lucene.spatial3d.Geo3DPoint.fromPolygon(Geo3DPoint.java:208)
   [junit4]    >        at org.apache.lucene.spatial3d.Geo3DPoint.newPolygonQuery(Geo3DPoint.java:142)
   [junit4]    >        at org.apache.lucene.spatial3d.TestGeo3DPoint.random3DQuery(TestGeo3DPoint.java:530)
   [junit4]    >        at org.apache.lucene.spatial3d.TestGeo3DPoint.verify(TestGeo3DPoint.java:736)
   [junit4]    >        at org.apache.lucene.spatial3d.TestGeo3DPoint.doTestRandom(TestGeo3DPoint.java:517)
   [junit4]    >        at org.apache.lucene.spatial3d.TestGeo3DPoint.testRandomMedium(TestGeo3DPoint.java:444)
   [junit4]    >        at java.lang.Thread.run(Thread.java:745)
   [junit4]   2> NOTE: test params are: codec=Asserting(Lucene60): {id=FST50}, docValues:{id=DocValuesFormat(name=Lucene54)}, maxPointsInLeafNode=704, maxMBSortInHeap=6.742140110558433, sim=ClassicSimilarity, locale=ar-DZ, timezone=America/Porto_Acre
   [junit4]   2> NOTE: Windows 7 6.1 amd64/Oracle Corporation 1.8.0_45 (64-bit)/cpus=4,threads=1,free=123382872,total=235405312
   [junit4]   2> NOTE: All tests run in this JVM: [TestGeo3DPoint]
{code}


> Geo3d polygon creation should not get upset about co-linear points
> ------------------------------------------------------------------
>
>                 Key: LUCENE-7192
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7192
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/spatial3d
>    Affects Versions: master
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>
> Currently, if you create a polygon with co-linear adjacent points, the polygon fails to create (you get IllegalArgumentException).  We should make this more robust.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org