Hi Ignacio,

It is not clear to me from your post whether you are proposing making
package-private classes public, or are proposing additional code to support
general 2D polygon intersection.

In Geo3D, there is currently only support for computing the intersection
with shapes that implement GeoArea.  These only include GeoBBox (2D) and
XYZSolid (3D).  Currently, GeoPolygon objects do *not* implement GeoArea.
This is by design.  There are many cases and corner cases that would need
algorithmic development to properly implement polygon intersection.

If you need to support this case, feel free to create a ticket and supply a
patch where GeoPolygon extends GeoArea.  You will need to implement
getRelationship() for GeoComplexPolygon, GeoConvexPolygon,
GeoConcavePolygon, and GeoCompositePolygon.  I would also urge you to
include many test cases to be sure your code is working as designed.

Thanks,
Karl


On Mon, Jul 17, 2017 at 4:06 AM, Ignacio Vera (JIRA) <j...@apache.org>
wrote:

> Ignacio Vera created LUCENE-7906:
> ------------------------------------
>
>              Summary: 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
>
>
> 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: dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: dev-h...@lucene.apache.org
>
>

Reply via email to