[
https://issues.apache.org/jira/browse/LUCENE-7906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16095531#comment-16095531
]
Karl Wright commented on LUCENE-7906:
-------------------------------------
Hi [~ivera], I had a more detailed look a this patch.
I note that there is a symmetry difference between GeoConcavePolygon and
GeoConvexPolygon that I don't understand. GeoConcavePolygon has the following
lazy-init'd member variable:
{code}
+ /** Convex polygon counter part used for bounding intersections. Lazy
initialized */
+ protected GeoPolygon convexPolygon=null;
+
{code}
GeoConvexPolygon has no similar member variable. Can you explain why one has
the converse shape, and the other doesn't? What is the code trying to do here?
I also worry a bit when a direct shape inversion is used, because points that
are *on* a shape edge will be members of both the shape and its inverse. That
may not be what you want.
The tests look good so far, but you really want to consider adding a randomized
test as well. Have a look at extending some of the randomized Geo3d testing
classes under spatial-extras to include testing intersections against polygons:
{code}
06/29/2017 01:39 PM 10,420 Geo3dRptTest.java
06/29/2017 01:39 PM 9,563 Geo3dShapeRectRelationTestCase.java
04/17/2016 03:38 PM 3,418
Geo3dShapeSphereModelRectRelationTest.java
04/05/2016 06:10 AM 6,144 Geo3dShapeWGS84ModelRectRelationTest.java
03/31/2016 08:08 PM 10,239 RandomizedShapeTestCase.java
{code}
> Spatial relationship between Geoshapes
> --------------------------------------
>
> Key: LUCENE-7906
> URL: https://issues.apache.org/jira/browse/LUCENE-7906
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/spatial3d
> Reporter: Ignacio Vera
> Assignee: Karl Wright
> Attachments: LUCENE-7906.patch
>
>
> Hi,
> Working with geosahpes and trying to resolve spatial relationships between
> them I came accross a big limitation when trying to solve the relationship
> between two geopolygons. This object does not expose the internal structure.
> In particular at some point, it is necessary to check if one polygon
> intersects the edges of the other polygon which currently is not possible as
> edges are not exposed.
> To be able to perform such operation it can be several options. The ones I
> can think of are:
> 1) Expose the edges of the polygon ( and probably the notable points for the
> edges) adding getters in the GeoPolygon interface. Easy to implement and
> leave users the responsability of coding the spatial relationship.
> 2) Extends GeoPolygon interface to extends geoarea and leave the object make
> the spatial relationship.
> 3) Extends GeoShape interface so all shapes can infer the spatial
> relationship with other GeoShapes.
> I might be bias as my interest is in 2d Shapes in the unit sphere and there
> might be some cases which what I propose cannot be implemented or are againts
> the aim of the library.
> What do you think?
> Cheers,
> Ignacio
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]