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

Karl Wright commented on LUCENE-8220:
-------------------------------------

I've augmented the output for this kind of failure to print the 
GeoConcavePolygon points attempted:

{code}
   [junit4] ERROR   0.02s J2 | GeoPolygonTest.testCoplanarityTileConvex <<<
   [junit4]    > Throwable #1: java.lang.IllegalArgumentException: Could not 
construct GeoConcavePolygon due to colinearity of points:  
[lat=1.1479899664334199, lon=0.425760260307307([X=0.3736898659162658, 
Y=0.1694681499562862, Z=0.9119410234559455])] [lat=1.1479899664334199, 
lon=0.42576359388617835([X=0.37368930097874536, Y=0.169469395679986, 
Z=0.9119410234559455])] [lat=1.1479899664334199, 
lon=0.4257611678785181([X=0.37368971211169777, Y=0.16946848910638057, 
Z=0.9119410234559455])]
   [junit4]    >        at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeConcavePolygon(GeoPolygonFactory.java:1087)
   [junit4]    >        at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.buildPolygonShape(GeoPolygonFactory.java:999)
   [junit4]    >        at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.buildPolygonShape(GeoPolygonFactory.java:948)
   [junit4]    >        at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.generateGeoPolygon(GeoPolygonFactory.java:379)
   [junit4]    >        at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeGeoPolygon(GeoPolygonFactory.java:171)
   [junit4]    >        at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeGeoPolygon(GeoPolygonFactory.java:96)
   [junit4]    >        at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeGeoPolygon(GeoPolygonFactory.java:50)
   [junit4]    >        at 
org.apache.lucene.spatial3d.geom.GeoPolygonTest.testCoplanarityTileConvex(GeoPolygonTest.java:1123)
   [junit4]    > Caused by: java.lang.IllegalArgumentException: Polygon points 
are all coplanar
   [junit4]    >        at 
org.apache.lucene.spatial3d.geom.GeoConcavePolygon.done(GeoConcavePolygon.java:221)
   [junit4]    >        at 
org.apache.lucene.spatial3d.geom.GeoConcavePolygon.<init>(GeoConcavePolygon.java:127)
   [junit4]    >        at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.makeConcavePolygon(GeoPolygonFactory.java:1073)
   [junit4]    >        ... 27 more
{code}


> GeoPolygon factory still shows problems with coplanar points
> ------------------------------------------------------------
>
>                 Key: LUCENE-8220
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8220
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial3d
>            Reporter: Ignacio Vera
>            Assignee: Karl Wright
>            Priority: Major
>         Attachments: concave.jpg, concaveWithTiling.jpg, 
> coplanarity-test.patch
>
>
> The attached patch contains two polygons that still shows problems with 
> co-planar points. To better explain the issue I attached some images:
> 1) concave.jpg:  This is the polygon we want to build. Note that we want to 
> build the concave part, therefore the blue part is actually not part of the 
> shape and the white part is the area cover by the shape.
> 2) concaveWithTiling.jpg: The algorithm of the polygon factory tries to tile 
> the polygon using convex polygons. In our case it creates the three colored 
> polygons on the image. What it remains is a concave polygon.
> The problem with this polygon is that the right edge of the concave polygon 
> contains co-planar points. These points cannot be merged into a single plane 
> because they have different properties (internal edges or shape edges).
> Because GeoConvexPolygon and GeoConcavePolygon cannot handle polygons with 
> co-planar points, the polygon cannot be built.
> [~kwri...@metacarta.com], Is it possible to make this polygons support such 
> an extreme case?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to