[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-26 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 6b42cf38647c7187d23148b78b25a88bb2c1faee in lucene-solr's branch 
refs/heads/branch_6x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6b42cf3 ]

LUCENE-8220: Fix yet another case where we cannot tile.


> 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
> Fix For: 6.7, 7.4, master (8.0)
>
> Attachments: concave.jpg, concaveWithTiling.jpg, 
> coplanarity-test.patch, coplanarity-test2.patch, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-26 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 26ba705a4f2537505fd75a326a751a627694bd32 in lucene-solr's branch 
refs/heads/master from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=26ba705 ]

LUCENE-8220: Fix yet another case where we cannot tile.


> 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
> Fix For: 6.7, 7.4, master (8.0)
>
> Attachments: concave.jpg, concaveWithTiling.jpg, 
> coplanarity-test.patch, coplanarity-test2.patch, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-26 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 13fdd07e24a3a6f5201ad28b828b1b034608b2b7 in lucene-solr's branch 
refs/heads/branch_7x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=13fdd07 ]

LUCENE-8220: Fix yet another case where we cannot tile.


> 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
> Fix For: 6.7, 7.4, master (8.0)
>
> Attachments: concave.jpg, concaveWithTiling.jpg, 
> coplanarity-test.patch, coplanarity-test2.patch, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit a13befe7580c93b8721a4680b8208de3b8c49d5e in lucene-solr's branch 
refs/heads/branch_6x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=a13befe ]

LUCENE-8220: Add general makeGeoPolygon variant that decides the best 
technology for you.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 93140c0c21d2b4bea9be4ddf00629f23bc936667 in lucene-solr's branch 
refs/heads/branch_7x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=93140c0 ]

LUCENE-8220: Add general makeGeoPolygon variant that decides the best 
technology for you.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 85c182607b5bf233d6eda3ac3fbe4d122ac99cd7 in lucene-solr's branch 
refs/heads/master from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=85c1826 ]

LUCENE-8220: Add general makeGeoPolygon variant that decides the best 
technology for you.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread Ignacio Vera (JIRA)

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

Ignacio Vera commented on LUCENE-8220:
--

I wanted to file a Jira ticket to add such a factory method, something like 
{{makeBestGeoPolygon}} and even offer the user to input the cut over if they 
want to do so.

This would be great as it could be used is the Geo3d wrapper!

I wonder if to avoid changing too much existing API, we should allow the 
factory method {{makeGeoPolygon}} fail with a tile exception (nice, it can be 
recognized) and move the failover to a new factory method that does what you 
explain above. 

> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

[~ivera] Switchover code has been implemented and committed, and the tests 
enabled.

The only remaining concerns are as follows:

(1) The API for makeGeoPolygon() accepts holes as other GeoPolygons.  This is 
incompatible with GeoComplexPolygon, so I've disabled the cutover in the case 
where holes are present.  The right thing to do in any case is create a new 
variant of the makeGeoPolygon() method that accepts holes as a list of 
PolygonDescription objects, and builds them itself.  We'd want to deprecate the 
old method also.

(2) It's also plausible now to automatically decide, based on number of points, 
whether we want to cut over to GeoComplexPolygon based on polygon complexity.  
We may want to implement a cutover automatically at (say) 100 points, just for 
performance reasons.



> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 81ac4d28fb9eacfe80a9ce9e880b5592ea51e363 in lucene-solr's branch 
refs/heads/branch_6x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=81ac4d2 ]

LUCENE-8220: Switch over to using GeoComplexPolygon if we can't tile a polygon.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 9b0721be32eea98f8d32fd1d0e5c26e7af1201b0 in lucene-solr's branch 
refs/heads/branch_7x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=9b0721b ]

LUCENE-8220: Switch over to using GeoComplexPolygon if we can't tile a polygon.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 273a829c465a539de66049713ffb5ea58dd2278a in lucene-solr's branch 
refs/heads/master from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=273a829 ]

LUCENE-8220: Switch over to using GeoComplexPolygon if we can't tile a polygon.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread Ignacio Vera (JIRA)

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

Ignacio Vera commented on LUCENE-8220:
--

For the concave issue I have already thought about that as there is no obvious 
solution with tiling. Even more, tiling is expected to have limitations when 
points are very close together. Checks for problematic polygons look good, so 
+1 for a backoff strategy.

> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

The more I look at this, the more I think having a "use GeoComplexPolygon as a 
backoff" strategy is the right thing to do.

I've committed some code cleanup designed to simplify the process of 
implementing that.  I'll be doing more such cleanup as I implement.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 88b057025024521be21c3c32b32fc1cd14b141f2 in lucene-solr's branch 
refs/heads/branch_6x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=88b0570 ]

LUCENE-8220: Code cleanup in preparation for returning GeoComplexPolygon as an 
alternative instead of tiling.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit f8b7399bb68e3fad4f2748db3e3633e040f9d6cc in lucene-solr's branch 
refs/heads/branch_7x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f8b7399 ]

LUCENE-8220: Code cleanup in preparation for returning GeoComplexPolygon as an 
alternative instead of tiling.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 5e1d6f36f71b693096c687cd4753847c2a8c107c in lucene-solr's branch 
refs/heads/master from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5e1d6f3 ]

LUCENE-8220: Code cleanup in preparation for returning GeoComplexPolygon as an 
alternative instead of tiling.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

I think some of the communication disconnect we have been having is due to the 
fact that I'm thinking that tiling of GeoConvexPolygon and GeoConcavePolygon is 
really only applicable to polygons whose edges are fairly long to start with.  
Polygons whose edge points are very close together is not the expected use case 
of this approach; that is what GeoComplexPolygon is for.

The problem you demonstrate can still occur in a larger-scale polygon, but only 
if there's a chance alignment between one edge and a point on the other side of 
the polygon.  My thinking, and the code I've committed is meant to deal with 
that specific failure case, and not the case where the tinyness of the polygon 
prevents *all* possible new edges from being created.  I still have no idea how 
to solve that problem.

It may be worth having the exception that is currently thrown recommend using 
GeoComplexPolygon instead.  Or, maybe the factory should automatically choose 
that representation if we see that situation arise.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 9bd84fccd6af3a1ecf586acebfa5c0dd8a33755e in lucene-solr's branch 
refs/heads/branch_6x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=9bd84fc ]

LUCENE-8220: need a continue, not a break


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 67572cf6d3127df3e749019bfcdcef97c738c6b1 in lucene-solr's branch 
refs/heads/branch_7x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=67572cf ]

LUCENE-8220: need a continue, not a break


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 9e5468adcd156f6ff2592d8607afd83f7303a860 in lucene-solr's branch 
refs/heads/master from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=9e5468a ]

LUCENE-8220: need a continue, not a break


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread Ignacio Vera (JIRA)

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

Ignacio Vera commented on LUCENE-8220:
--

The patch proves that problems arise when co-planar points are added into the 
edge buffer. The replace method of the edge buffer merges those situations into 
one single edge. The problem is that the merged edges can have different 
internal flags. In the patch the value for the merged edge is false if any of 
the edges is not internal.

In the concave case, the polygon can be built but it is not fully correct as 
the edge of one convex tile has been merged and it has wrong internal flag 
(right vertical edge in concaveWithtiling.jpg).  This is a generic problem 
whenever edges are merged this way, that is the reason one of the test is 
failing now, because of a merged edge.

When collecting points prior to build the final GeoConcavePolygon or 
GeoConvexPolygon, we can detect those situations and do something about it. In 
the convex case, further divide the edges, not sure in the concave case. 

> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 87feabaee2fff063692ceb9a1e108c6e9e41b9d0 in lucene-solr's branch 
refs/heads/branch_6x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=87feaba ]

LUCENE-8220: Refine how handle tiling coplanarities further.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit fbeb3a4b682fdf290a3de4e865ce089f5657b4e8 in lucene-solr's branch 
refs/heads/branch_7x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fbeb3a4 ]

LUCENE-8220: Refine how handle tiling coplanarities further.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit d49ba5c333d06953b323ba18b133e706d9d06fc3 in lucene-solr's branch 
refs/heads/master from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d49ba5c ]

LUCENE-8220: Refine how handle tiling coplanarities further.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-25 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

[~ivera], I now understand why the GeoConcavePolygon construction failed: my 
check for whether a usable tiling had been found or not was in the wrong place. 
 So that mystery is cleared up, and I'll commit new code right now to address 
that.  But the tiling does not complete still with the right change, because 
the only choices for edges to split the (non-concave) polygon all indeed yield 
effectively colinear edges in this example.  Indeed, I agree this is 
theoretically possible during the tiling process whenever a new edge is created.

Polygons with very-close-together edge points that nevertheless cover 
significant area are susceptible to this issue.  In order for the tiling to 
work, edges that are created for tiling must be labeled "internal", and we must 
use exactly the same edge for both tiles that the edge is involved with.  It 
looks like your earlier patches achieve that by just making sure we don't pick 
a tiling that doesn't work.  Am I correct in this?

I'm beginning to at least understand the philosophy behind keeping "extended 
edges" around.  I'm still unsure that has the potential to solve the general 
problem, though.




> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

[~ivera], can you explain to me why the construction of the GeoConcavePolygon 
in the test case with this change no longer fails?  I'm having a hard time 
seeing why this approach fixes anything, frankly.


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Ignacio Vera (JIRA)

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

Ignacio Vera commented on LUCENE-8220:
--

It fails because it expects three tiles but only gets two because it ignores 
co-planar points.

The patch was intended to share my approach and see if it is worthy pursuing 
this path.

There is one step missing, when collecting points and internal edges for convex 
polygons we need to check if there are co-planar points, if so divide them into 
two (or more) polygons.  Then we will get three tiles (correct answer) and test 
will pass.

I don't know what to do in that case for concave polygons.

 

 

 

 

> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

[~ivera], when I apply the patch and un-ignore the test, that test passes, but 
other tests fail, e.g.:

{code}
   [junit4] Suite: org.apache.lucene.spatial3d.geom.RandomGeoPolygonTest
   [junit4]   2> NOTE: reproduce with: ant test  
-Dtestcase=RandomGeoPolygonTest -Dtests.method=testCoplanarityTilePolygon 
-Dtests.seed=A69C6E2335E509EF -Dtests.slow=true -Dtests.badapples=true 
-Dtests.locale=is-IS -Dtests.tim
ezone=Pacific/Galapagos -Dtests.asserts=true -Dtests.file.encoding=Cp1252
   [junit4] FAILURE 0.15s J1 | RandomGeoPolygonTest.testCoplanarityTilePolygon 
<<<
   [junit4]> Throwable #1: java.lang.AssertionError
   [junit4]>at 
__randomizedtesting.SeedInfo.seed([A69C6E2335E509EF:DF4889912003CEF6]:0)
   [junit4]>at 
org.apache.lucene.spatial3d.geom.RandomGeoPolygonTest.testCoplanarityTilePolygon(RandomGeoPolygonTest.java:85)
   [junit4]>at java.lang.Thread.run(Thread.java:745)
   [junit4]   2> NOTE: test params are: codec=Asserting(Lucene70): {}, 
docValues:{}, maxPointsInLeafNode=1050, maxMBSortInHeap=7.671874176950007, 
sim=Asserting(org.apache.lucene.search.similarities.AssertingSimilarity@580819b1
), locale=is-IS, timezone=Pacific/Galapagos
   [junit4]   2> NOTE: Windows 8.1 6.3 amd64/Oracle Corporation 1.8.0_45 
(64-bit)/cpus=4,threads=1,free=119276696,total=128974848
   [junit4]   2> NOTE: All tests run in this JVM: [RandomGeoPolygonTest]
{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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

[~ivera] Was this second patch made against what is currently committed on 
master?


> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Ignacio Vera (JIRA)

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

Ignacio Vera commented on LUCENE-8220:
--

Attached my approach changing the definition of Edge class and replace method 
in edgeBuffer. The patch needs a bit of work as it ignores the co-planar points 
but the tiling is successful. It should not be difficult to divide into two (or 
more) polygons when there are co-planar points for convex polygons.


The big thingy here is with concave polygons as you cannot divide into two (or 
more)  polygons when there are co-planar points.

 

 

 

> 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, factory.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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

[~ivera] I committed the changes I made, with the questionable test @Ignored.  
There's commented-out logic in the class to determine if an intersecting 
polygon has been provided; I hope it still works.


> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit d5eb1088cd79fd915016c7ad9a7a6b3e53fc354c in lucene-solr's branch 
refs/heads/branch_6x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d5eb108 ]

LUCENE-8220: Handle polygon tiling issues in a more robust way.


> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit e88066ab7848d74d1da9d67f53fd5e3aff1a3412 in lucene-solr's branch 
refs/heads/branch_7x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e88066a ]

LUCENE-8220: Handle polygon tiling issues in a more robust way.


> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-8220:
-

Commit 086682bc335e2e7fd6c70e5a6be9117ac8c40581 in lucene-solr's branch 
refs/heads/master from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=086682b ]

LUCENE-8220: Handle polygon tiling issues in a more robust way.


> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

The points it is winding up with imply it's decided to include the whole world:

{code}
   [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])]
{code}

[~ivera], this is obviously incorrect.  It makes me wonder if the original 
polygon crosses itself?  Yes, I know you have a 2D graphic for it, but given 
the far northerly latitude, I doubt that the planar rendering is meaningful.


> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-8220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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.(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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

I solved the tiling issue successfully, but then we wind up with the attempted 
construction of a concave polygon with all colinear points.  That's essentially 
saying that it wants to include either half of, or all of, the world -- which 
in this case may make sense.  I have to analyze the situation more completely 
later today to see what it's trying to do.

For the record, the tiling fix is simple.  The code in question looks for edge 
sidedness violations that would preclude use of a GeoConcavePolygon.  It used 
to take the first such detection and generate a triangle and two other sections 
from that.  Now, it attempts to do that, but if it fails, it just continues 
looking for another violation.  Only if it finds violations and can't find a 
way to address them does it throw an IllegalArgumentException.  I believe this 
will always work because violations always come in pairs.  We'll see.


> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

[~ivera], I disagree on the approach; I fear it would make the math in 
GeoConvexPolygon complex and unstable.

It is quite possible to avoid colinearity.  In fact, it's straightforward.  
It's a question of detection, and of generating two polygons instead of one in 
some cases.

Also, FWIW, only one of the two newly added tests fails -- the other succeeds 
fine.


> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Ignacio Vera (JIRA)

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

Ignacio Vera commented on LUCENE-8220:
--

I think we cannot avoid this colinearity. In the example provided it is clear 
there is no alternative on how the polygon can be tiled. The colinear points 
must be added.

I think the definition of an edge can be changed. Currently it is a sided plane 
with a start and end point and an internal flag. It can be changed to a sided 
plane with two or more points with corresponding internal flags.

When replacing edges we can add the new edge or add the point to an existing 
edge if colinear.

BUT then you build convex and concave polygons with co-planar points  where it 
breaks.

 

 

 

 

 

 

 

> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

Indeed, suppressing the creation of that triangle leads to a further failure:

{code}
   [junit4] ERROR   0.01s J1 | GeoPolygonTest.testCoplanarityTileConvex <<<
   [junit4]> Throwable #1: java.lang.IllegalArgumentException: Cannot 
determine sidedness because check point is on plane.
   [junit4]>at 
org.apache.lucene.spatial3d.geom.SidedPlane.(SidedPlane.java:113)
   [junit4]>at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory$EdgeBuffer.(GeoPolygonFactory.java:1494)
   [junit4]>at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.buildPolygonShape(GeoPolygonFactory.java:757)
   [junit4]>at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.buildPolygonShape(GeoPolygonFactory.java:934)
   [junit4]>at 
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.buildPolygonShape(GeoPolygonFactory.java:934)
   [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)
{code}

So, basically, the logic upstream needs to change to perform the shape 
breakdown differently.  I'll have to think through how.


> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

Looking elsewhere, I find that the code for colinearity has been changed, and I 
don't fully understand it anymore.  But since that's not a current problem, and 
since that code seems to be going to great lengths to find chords that aren't 
colinear, I'm going to concentrate on the failure case.  Once that's 
understood, we may want to revisit the other parts of the code to see if 
there's a more general solution.

The code that fails is this:

{code}
  // thePoint is on the wrong side of the complementary plane.  That 
means we cannot build a concave polygon, because the complement would not
  // be a legal convex polygon.
  // But we can take advantage of the fact that the distance between 
the edge and thePoint is less than 180 degrees, and so we can split the
  // would-be concave polygon into three segments.  The first segment 
includes the edge and thePoint, and uses the sense of the edge to determine the 
sense
  // of the polygon.
  
  // This should be the only problematic part of the polygon.
  // We know that thePoint is on the "wrong" side of the edge -- that 
is, it's on the side that the
  // edge is pointing at.
  final List thirdPartPoints = new ArrayList<>(3);
  final BitSet thirdPartInternal = new BitSet();
  thirdPartPoints.add(checkEdge.startPoint);
  thirdPartInternal.set(0, checkEdge.isInternal);
  thirdPartPoints.add(checkEdge.endPoint);
  thirdPartInternal.set(1, true);
  thirdPartPoints.add(thePoint);
  assert checkEdge.plane.isWithin(thePoint) : "Point was on wrong side 
of complementary plane, so must be on the right side of the non-complementary 
plane!";
  final GeoPolygon convexPart = new GeoConvexPolygon(planetModel, 
thirdPartPoints, holes, thirdPartInternal, true);
...
{code}

It is building a polygon with only three points, and the three points are 
coplanar.  So the polygon obviously cannot be built.  In fact, the problem must 
be in the logic that leads to the decision to build it at all.

The simplest thing to do is not generate this triangle if it's coplanar, and 
just keep going.  That's easy to detect and trivial to code.  Things may blow 
up in the subsequent steps, however.  Trying this now.


> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

Ok, this is the actual test case that is failing:

{code}
  @Test
  public void testCoplanarityTileConvex() throws Exception {
//POLYGON((24.39398 65.77519,24.3941 65.77498,24.394024 65.77497,24.393976 
65.77495,24.393963 65.77493,24.394068 65.774925,24.394156 65.77495,24.394201 
65.77495,24.394234 65.77496,24.394266 65.77498,24.394318 65.77498,24.39434 
65.774956,24.394377 65.77495,24.394451 65.77494,24.394476 65.77495,24.394457 
65.77498,24.39398 65.77519))"
List points = new ArrayList<>();
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77519), Geo3DUtil.fromDegrees(24.39398)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77498), Geo3DUtil.fromDegrees(24.3941)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77497), Geo3DUtil.fromDegrees(24.394024)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77495), Geo3DUtil.fromDegrees(24.393976)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77493), Geo3DUtil.fromDegrees(24.393963)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.774925), Geo3DUtil.fromDegrees(24.394068)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77495), Geo3DUtil.fromDegrees(24.394156)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77495), Geo3DUtil.fromDegrees(24.394201)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77496), Geo3DUtil.fromDegrees(24.394234)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77498), Geo3DUtil.fromDegrees(24.394266)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77498), Geo3DUtil.fromDegrees(24.394318)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.774956), Geo3DUtil.fromDegrees(24.39434)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77495), Geo3DUtil.fromDegrees(24.394377)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77494), Geo3DUtil.fromDegrees(24.394451)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77495), Geo3DUtil.fromDegrees(24.394476)));
points.add(new GeoPoint(PlanetModel.SPHERE, 
Geo3DUtil.fromDegrees(65.77498), Geo3DUtil.fromDegrees(24.394457)));
GeoCompositePolygon polygon = 
(GeoCompositePolygon)GeoPolygonFactory.makeGeoPolygon(PlanetModel.SPHERE, 
points);
assertTrue(polygon != null);
  }
{code}

It's trying, in fact, to tile the whole world EXCEPT for a small piece.  It 
slices some pieces off but then it's left with a piece that still spans, in at 
least one direction, more than 180 degrees.  That means it cannot use 
GeoConcavePolygon.  So instead, it tries to break it down further by slicing 
across, and even comes up with a way to do that, but the slice it identifies 
turns out to have colinear points.

So it's not the GeoConcavePolygon invocation where this can happen.  But, 
theoretically, it can happen any time we drop a chord across the polygon.

The easy solution is to change the algorithm so that whenever it introduces 
such a chord, it checks to see whether it's colinear with the next point in 
either direction.  If it is, it must do a further split, right there, so that 
there are two pieces built, rather than one, and thus colinearity is not 
possible.  Looking into that now.


> 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 

[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-24 Thread Ignacio Vera (JIRA)

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

Ignacio Vera commented on LUCENE-8220:
--

Note that this can happen for convex polygons as well. There is a failing test 
for convex polygons in the patch with the same issue.

The co-planarity is added when the edges of a convex tile are replaced in the 
edge buffer with a return edge. Because the return edge is internal and the 
edges in the buffer are most likely edges of the shape, they cannot be merged 
without losing information.

 

> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-23 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

It should be easy to fix this.  Instead of putting the logic in the concave 
polygon constructor, it should go in the factory, because (a) it's already 
there, and (b) it only happens for the concave polygon at the end, since there 
are N convex poly's and 1 concave one.  I'll implement something early 
tomorrow, when I'm fresh.


> 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



[jira] [Commented] (LUCENE-8220) GeoPolygon factory still shows problems with coplanar points

2018-03-23 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-8220:
-

I will look at this tomorrow.


> 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-planarity 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 id actually not part of the 
> shape and the white part is the are 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 coloured 
> 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 hadle polygons with 
> coplanar 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