Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8632

XYShape: Adapt LatLonShape tessellator, field type, and queries to non-geo shapes

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • None
    • None
    • None
    • None
    • New

    Description

      Currently the tessellator is tightly coupled with latitude and longitude (WGS84) geospatial coordinates. This issue will explore generalizing the tessellator, LatLonShape field and LatLonShapeQuery to non geospatial (cartesian) coordinate systems so lucene can provide the index & search capability for general geometry / non GIS type use cases.

      Attachments

        Issue Links

          Activity

            nknize Nick Knize added a comment -

            Opened a PR for adding the ability to index and search non Geo / GIS Geometries by leveraging and abstracting much of the LatLonShape foundation. I chose the PR route since the number of lines is quite big and I figured it would be easier to review instead of attaching a patch.

            nknize Nick Knize added a comment - Opened a PR for adding the ability to index and search non Geo / GIS Geometries by leveraging and abstracting much of the LatLonShape foundation. I chose the PR route since the number of lines is quite big and I figured it would be easier to review instead of attaching a patch.

            Commit 0c09481374cab029d57b0f9b45994822c0dcd39b in lucene-solr's branch refs/heads/master from Nicholas Knize
            [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=0c09481 ]

            LUCENE-8632: New XYShape Field and Queries for indexing and searching general cartesian geometries

            The LatLonShape field and LatLonShape query classes added the ability to index and search geospatial
            geometries in the WGS-84 latitude, longitude coordinate reference system. The foundation for this
            capability is provided by the Tessellator that converts an array of vertices describing a Point Line
            or Polygon into a stream of 3 vertex triangles that are encoded as a seven dimension point and
            indexed using the BKD POINT structure. A nice property of the Tessellator is that lat, lon
            restrictions are artificial and really only bound by the API.

            This commit builds on top of / abstracts the Tessellator LatLonShape and LatLonShapeQuery classes to
            provide the ability to index & search general cartesian (non WGS84 lat,lon restricted) geometry.
            It does so by introducing two new base classes: ShapeField and ShapeQuery that provide the indexing
            and search foundation for LatLonShape and the LatLonShape derived query classes
            (LatLonShapeBoundingBoxQuery, LatLonShapeLineQuery, LatLonShapePolygonQuery) and introducing a new
            XYShape factory class along with XYShape derived query classes (XYShapeBoundingBoxQuery,
            XYShapeLineQuery, XYShapePolygonQuery). The heart of the cartesian indexing is achieved through
            XYShapeEncodingUtils that converts the double precision vertices into an integer encoded seven
            dimension point (similar to LatLonShape).

            The test framework is also further abstracted and extended to provide a full test suite for the
            new XYShape capability that works the same way as the LatLonShape test suite (but applied to non
            GIS geometries).

            jira-bot ASF subversion and git services added a comment - Commit 0c09481374cab029d57b0f9b45994822c0dcd39b in lucene-solr's branch refs/heads/master from Nicholas Knize [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=0c09481 ] LUCENE-8632 : New XYShape Field and Queries for indexing and searching general cartesian geometries The LatLonShape field and LatLonShape query classes added the ability to index and search geospatial geometries in the WGS-84 latitude, longitude coordinate reference system. The foundation for this capability is provided by the Tessellator that converts an array of vertices describing a Point Line or Polygon into a stream of 3 vertex triangles that are encoded as a seven dimension point and indexed using the BKD POINT structure. A nice property of the Tessellator is that lat, lon restrictions are artificial and really only bound by the API. This commit builds on top of / abstracts the Tessellator LatLonShape and LatLonShapeQuery classes to provide the ability to index & search general cartesian (non WGS84 lat,lon restricted) geometry. It does so by introducing two new base classes: ShapeField and ShapeQuery that provide the indexing and search foundation for LatLonShape and the LatLonShape derived query classes (LatLonShapeBoundingBoxQuery, LatLonShapeLineQuery, LatLonShapePolygonQuery) and introducing a new XYShape factory class along with XYShape derived query classes (XYShapeBoundingBoxQuery, XYShapeLineQuery, XYShapePolygonQuery). The heart of the cartesian indexing is achieved through XYShapeEncodingUtils that converts the double precision vertices into an integer encoded seven dimension point (similar to LatLonShape). The test framework is also further abstracted and extended to provide a full test suite for the new XYShape capability that works the same way as the LatLonShape test suite (but applied to non GIS geometries).

            Commit 81c88e2df30428f61fad6129525d839c57e08504 in lucene-solr's branch refs/heads/branch_8x from Nicholas Knize
            [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=81c88e2 ]

            LUCENE-8632: New XYShape Field and Queries for indexing and searching general cartesian geometries

            The LatLonShape field and LatLonShape query classes added the ability to index and search geospatial
            geometries in the WGS-84 latitude, longitude coordinate reference system. The foundation for this
            capability is provided by the Tessellator that converts an array of vertices describing a Point Line
            or Polygon into a stream of 3 vertex triangles that are encoded as a seven dimension point and
            indexed using the BKD POINT structure. A nice property of the Tessellator is that lat, lon
            restrictions are artificial and really only bound by the API.

            This commit builds on top of / abstracts the Tessellator LatLonShape and LatLonShapeQuery classes to
            provide the ability to index & search general cartesian (non WGS84 lat,lon restricted) geometry.
            It does so by introducing two new base classes: ShapeField and ShapeQuery that provide the indexing
            and search foundation for LatLonShape and the LatLonShape derived query classes
            (LatLonShapeBoundingBoxQuery, LatLonShapeLineQuery, LatLonShapePolygonQuery) and introducing a new
            XYShape factory class along with XYShape derived query classes (XYShapeBoundingBoxQuery,
            XYShapeLineQuery, XYShapePolygonQuery). The heart of the cartesian indexing is achieved through
            XYShapeEncodingUtils that converts the double precision vertices into an integer encoded seven
            dimension point (similar to LatLonShape).

            The test framework is also further abstracted and extended to provide a full test suite for the
            new XYShape capability that works the same way as the LatLonShape test suite (but applied to non
            GIS geometries).

            jira-bot ASF subversion and git services added a comment - Commit 81c88e2df30428f61fad6129525d839c57e08504 in lucene-solr's branch refs/heads/branch_8x from Nicholas Knize [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=81c88e2 ] LUCENE-8632 : New XYShape Field and Queries for indexing and searching general cartesian geometries The LatLonShape field and LatLonShape query classes added the ability to index and search geospatial geometries in the WGS-84 latitude, longitude coordinate reference system. The foundation for this capability is provided by the Tessellator that converts an array of vertices describing a Point Line or Polygon into a stream of 3 vertex triangles that are encoded as a seven dimension point and indexed using the BKD POINT structure. A nice property of the Tessellator is that lat, lon restrictions are artificial and really only bound by the API. This commit builds on top of / abstracts the Tessellator LatLonShape and LatLonShapeQuery classes to provide the ability to index & search general cartesian (non WGS84 lat,lon restricted) geometry. It does so by introducing two new base classes: ShapeField and ShapeQuery that provide the indexing and search foundation for LatLonShape and the LatLonShape derived query classes (LatLonShapeBoundingBoxQuery, LatLonShapeLineQuery, LatLonShapePolygonQuery) and introducing a new XYShape factory class along with XYShape derived query classes (XYShapeBoundingBoxQuery, XYShapeLineQuery, XYShapePolygonQuery). The heart of the cartesian indexing is achieved through XYShapeEncodingUtils that converts the double precision vertices into an integer encoded seven dimension point (similar to LatLonShape). The test framework is also further abstracted and extended to provide a full test suite for the new XYShape capability that works the same way as the LatLonShape test suite (but applied to non GIS geometries).

            Commit 14b67012d03be4f0ec3b7f92fcdeeddd962f35ea in lucene-solr's branch refs/heads/master from Nicholas Knize
            [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=14b6701 ]

            LUCENE-8632: Fix EdgeTree.internalComponentRelateTriangle to pass correct line segment vertices

            jira-bot ASF subversion and git services added a comment - Commit 14b67012d03be4f0ec3b7f92fcdeeddd962f35ea in lucene-solr's branch refs/heads/master from Nicholas Knize [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=14b6701 ] LUCENE-8632 : Fix EdgeTree.internalComponentRelateTriangle to pass correct line segment vertices

            Commit 860e0be537840d6ae391ffd12061f44e406e030e in lucene-solr's branch refs/heads/branch_8x from Nicholas Knize
            [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=860e0be ]

            LUCENE-8632: Fix EdgeTree.internalComponentRelateTriangle to pass correct line segment vertices

            jira-bot ASF subversion and git services added a comment - Commit 860e0be537840d6ae391ffd12061f44e406e030e in lucene-solr's branch refs/heads/branch_8x from Nicholas Knize [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=860e0be ] LUCENE-8632 : Fix EdgeTree.internalComponentRelateTriangle to pass correct line segment vertices
            tomoko Tomoko Uchida added a comment -

            This issue was moved to GitHub issue: #9678.

            tomoko Tomoko Uchida added a comment - This issue was moved to GitHub issue: #9678 .

            People

              nknize Nick Knize
              nknize Nick Knize
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 5h 50m
                  5h 50m