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

Karl Wright commented on LUCENE-7906:
-------------------------------------

[~ivera], *requiring* GeoArea implementation for all GeoShapes very much 
complicates the implementation of new GeoShapes, and I would be very much 
against it.  You are welcome to try to implement GeoArea for GeoCircles but 
remember that your distance computation does not work in WGS84, only in SPHERE. 
 Complex shapes like GeoPaths are not only messy to make work generally, but 
they also have even messier considerations when you use WGS84.  Polygons in 
WGS84 aren't much harder than polygons in SPHERE which is why I thought that 
was doable, but after that point it gets much tougher.  The "GeoCircle" is by 
definition the intersection of a specific plane with the unit ellipsoid, so 
it's in fact an ellipse and distance calculations are exorbitantly expensive.

One of the reasons I am absolutely certain we need to include GeoPolygons in 
the randomized testing is because, for the geo3d world, such testing is 
essential to be sure you've really covered all the corner cases and have no 
numeric precision problems.  So this is something we need to tackle I'm afraid.

If your concern is that you want new shapes to be able to support your way of 
computing intersection, let me point out that any shape where the edge planes 
go through the ellipsoid center is likely to be represented as a polygon, so 
you've got that well covered.  It's the shapes that don't have that 
characteristic that I don't think are straightforward to implement.  So for 
that reason I'm OK with the way it's set up now.

Thanks!

> 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]

Reply via email to