[jira] [Commented] (LUCENE-7906) Spatial relationship between Geoshapes

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (LUCENE-7906) Spatial relationship between Geoshapes

JIRA jira@apache.org

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

Ignacio Vera commented on LUCENE-7906:

Hi  [~daddywri],

I would try to do so. I have already some code that works for simple polygons. Let see if I manage for more complex cases. I am concern with the case of GeoComplexPolygon but I will have a try.

By the way, there is something in the implementation of getRelationship in GeoRectangle that seems wrong. The  method call another method in  GeoBaseBox called isShapeInsideBBox. In this methods there is the following call:

final GeoPoint[] pathPoints = path.getEdgePoints();

Expecting more than one point returned that is not true as the doc says:

   * Return a sample point that is on the outside edge/boundary of the shape.
   * @return samples of all edge points from distinct edge sections.  Typically one point
   * is returned, but zero or two are also possible.
  public GeoPoint[] getEdgePoints();

I think that method is not doing what it is expected. Still the overall method getRelationship seems to work.



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

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]