[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16745085#comment-16745085 ] ASF subversion and git services commented on LUCENE-8581: - Commit 618812899cb1a6fc8ce7fa917ec4bc569686b0ff in lucene-solr's branch refs/heads/branch_7x from David Wayne Smiley [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=6188128 ] LUCENE-8581: Unreference LatLonPoint.BYTES from LatLonShape & Rectangle2D. (cherry picked from commit 70dd3ee06a49261da1c9d2c220f59ac9e73fc4c8) > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Fix For: 8.0, 7.7 > > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581_bytes.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16745080#comment-16745080 ] ASF subversion and git services commented on LUCENE-8581: - Commit 28f2f2d5340db84da8ce4e265726685ca7740095 in lucene-solr's branch refs/heads/branch_8x from David Wayne Smiley [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=28f2f2d ] LUCENE-8581: Unreference LatLonPoint.BYTES from LatLonShape & Rectangle2D. (cherry picked from commit 70dd3ee06a49261da1c9d2c220f59ac9e73fc4c8) > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Fix For: 8.0, 7.7 > > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581_bytes.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16745072#comment-16745072 ] ASF subversion and git services commented on LUCENE-8581: - Commit 70dd3ee06a49261da1c9d2c220f59ac9e73fc4c8 in lucene-solr's branch refs/heads/master from David Wayne Smiley [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=70dd3ee ] LUCENE-8581: Unreference LatLonPoint.BYTES from LatLonShape & Rectangle2D. > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Fix For: 8.0, 7.7 > > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581_bytes.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16744792#comment-16744792 ] Adrien Grand commented on LUCENE-8581: -- +1 > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Fix For: 8.0, 7.7 > > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581_bytes.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16734770#comment-16734770 ] David Smiley commented on LUCENE-8581: -- I attached a patch about this. > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Fix For: master (8.0), 7.7 > > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581_bytes.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16726177#comment-16726177 ] David Smiley commented on LUCENE-8581: -- It may be that there is some logic/encoding/decoding that is the same but it is purely a coincidence. In other words, if for some reason we wanted pure point data to have more precision and thus more bytes, then LatLonShape need not follow suit. Right? > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Fix For: master (8.0), 7.7 > > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16726112#comment-16726112 ] Adrien Grand commented on LUCENE-8581: -- bq. Why is Rectangle2D referring to LatLonShape.BYTES ? Instead, Shouldn't it define a private BYTES as Integer.BYTES? After all, it is this class that encodes/decodes them into a byte array using intToSortableBytes. +1 bq. Why is LatLonShape.BYTES referring to LatLonPoint.BYTES? I think it should define it as Integer.BYTES directly. I also think it could/should be private (or at least package level). I can see the argument going both ways on that one, reusing LatLonPoint.BYTES makes some sense since we are borrowing the way that it discretizes latitudes/longitudes into ints, so reusing the constant participates to conveying the information that we are borrowing encoding logic from LatLonPoint? > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Fix For: master (8.0), 7.7 > > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16725086#comment-16725086 ] David Smiley commented on LUCENE-8581: -- Great work! I was looking through the code and found some re-use of public static final BYTES constants that I have doubts we should have. # Why is Rectangle2D referring to LatLonShape.BYTES ? Instead, Shouldn't it define a private BYTES as Integer.BYTES? After all, it is this class that encodes/decodes them into a byte array using intToSortableBytes. # Why is LatLonShape.BYTES referring to LatLonPoint.BYTES? I think it should define it as Integer.BYTES directly. I also think it could/should be private (or at least package level). > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Fix For: master (8.0), 7.7 > > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16724781#comment-16724781 ] Adrien Grand commented on LUCENE-8581: -- According to luceneutil this change gives 8% faster box queries, 37% faster indexing and a 40% smaller index! http://people.apache.org/~mikemccand/geobench.html > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Fix For: master (8.0), 7.7 > > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16724186#comment-16724186 ] Adrien Grand commented on LUCENE-8581: -- +1 > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16724178#comment-16724178 ] Nicholas Knize commented on LUCENE-8581: Thanks for all of your work on this [~ivera]. This LGTM! > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Nicholas Knize >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16723352#comment-16723352 ] Nicholas Knize commented on LUCENE-8581: Everything's looking good. +1 to merge once these last two changes are in place /cc [~ivera] > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16723224#comment-16723224 ] Nicholas Knize commented on LUCENE-8581: {quote}Then let's also rename constants so that they enumerate coordinates in CCW order {quote} +1 > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16723189#comment-16723189 ] Adrien Grand commented on LUCENE-8581: -- Then let's also rename constants so that they enumerate coordinates in CCW order, ie. Y_MINX_MINY_MAXX_MAXY_X rather than Y_MINX_MAXY_X_MINY_MAXX? > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16723186#comment-16723186 ] Nicholas Knize commented on LUCENE-8581: {quote}I got you, new patch rotates edges and indeed simplifies the logic. {quote} ++1 this is great {quote}whether to go with CW or CCW order? {quote} Right hand rule is the typical convention and part of the standard. So let's go w/ CCW. > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16721336#comment-16721336 ] Adrien Grand commented on LUCENE-8581: -- +1 Let's get [~nknize]'s opinion about whether to go with CW or CCW order? > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16719097#comment-16719097 ] Adrien Grand commented on LUCENE-8581: -- bq. The last thing remaining is which orientation should we use in the encoding (currently CW). Is my assumption correct that with your changes to tests, whether we pick CW or CCW doesn't matter and is just a matter of convention? I still suspect that we could greatly simplify the encoding logic by first rotating vertices of the triangles so that we always have eg. ax == minx so that we never need to check this condition later on? > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch, LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16718189#comment-16718189 ] Lucene/Solr QA commented on LUCENE-8581: | (/) *{color:green}+1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 0s{color} | {color:green} The patch appears to include 4 new or modified test files. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 25s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 24s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 24s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Release audit (RAT) {color} | {color:green} 0m 24s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Check forbidden APIs {color} | {color:green} 0m 24s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Validate source patterns {color} | {color:green} 0m 24s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:green}+1{color} | {color:green} unit {color} | {color:green} 3m 11s{color} | {color:green} sandbox in the patch passed. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 6m 30s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | LUCENE-8581 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12951387/LUCENE-8581.patch | | Optional Tests | compile javac unit ratsources checkforbiddenapis validatesourcepatterns | | uname | Linux lucene1-us-west 4.4.0-137-generic #163~14.04.1-Ubuntu SMP Mon Sep 24 17:14:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | ant | | Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-LUCENE-Build/sourcedir/dev-tools/test-patch/lucene-solr-yetus-personality.sh | | git revision | master / 61e4486 | | ant | version: Apache Ant(TM) version 1.9.3 compiled on July 24 2018 | | Default Java | 1.8.0_191 | | Test Results | https://builds.apache.org/job/PreCommit-LUCENE-Build/136/testReport/ | | modules | C: lucene/sandbox U: lucene/sandbox | | Console output | https://builds.apache.org/job/PreCommit-LUCENE-Build/136/console | | Powered by | Apache Yetus 0.7.0 http://yetus.apache.org | This message was automatically generated. > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch, LUCENE-8581.patch, > LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16710425#comment-16710425 ] Lucene/Solr QA commented on LUCENE-8581: | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || || || || || {color:brown} Prechecks {color} || | {color:red}-1{color} | {color:red} test4tests {color} | {color:red} 0m 0s{color} | {color:red} The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 3s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 10s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 10s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Release audit (RAT) {color} | {color:green} 1m 10s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Check forbidden APIs {color} | {color:green} 1m 10s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Validate source patterns {color} | {color:green} 1m 10s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:green}+1{color} | {color:green} unit {color} | {color:green} 6m 36s{color} | {color:green} sandbox in the patch passed. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 11m 34s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | LUCENE-8581 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12950518/LUCENE-8581.patch | | Optional Tests | compile javac unit ratsources checkforbiddenapis validatesourcepatterns | | uname | Linux lucene2-us-west.apache.org 4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | ant | | Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-LUCENE-Build/sourcedir/dev-tools/test-patch/lucene-solr-yetus-personality.sh | | git revision | master / b0e6a92 | | ant | version: Apache Ant(TM) version 1.9.6 compiled on July 20 2018 | | Default Java | 1.8.0_191 | | Test Results | https://builds.apache.org/job/PreCommit-LUCENE-Build/131/testReport/ | | modules | C: lucene/sandbox U: lucene/sandbox | | Console output | https://builds.apache.org/job/PreCommit-LUCENE-Build/131/console | | Powered by | Apache Yetus 0.7.0 http://yetus.apache.org | This message was automatically generated. > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16709022#comment-16709022 ] Nicholas Knize commented on LUCENE-8581: {quote}Just for my curiosity. when creating a triangle in the tessellator points get order. is that really needed? what is the purpose? {quote} That can be removed. It's legacy from before the selective indexing approach was used. It sounds like that will solve a big part of the problem +1 for using 2^3 constants. And I also think we can continue to iterate on the readability part in a separate patch. I don't think it should hold up the bigger benefit of a smaller index. > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1670#comment-1670 ] Ignacio Vera commented on LUCENE-8581: -- {quote}it seems that giving all triangles the same orientation and rotating vertices would help reduce the number of conditionals? {quote} Yes, with this strategy you reduce the possible combinations to 2^3. {quote}is the reason why we think we should preserve ordering that we expect it to be easier later to record which edges of the triangles are shared with the polygon? {quote} I don't think it will matter, you should still be able to recognise each edge and mark it accordingly. {quote}maybe we should just have 2^3 constants instead of FIRST_BIT | SECOND_BIT | THIRD_BIT? {quote} That should make the code more readable. > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16708520#comment-16708520 ] Adrien Grand commented on LUCENE-8581: -- It seems that giving all triangles the same orientation (either by requiring an orientation or by changing the orientation of triangles that don't have the expected orientation) and rotating vertices so that the first one always has eg. minx as its x coordinate prior to encoding would help reduce the number of conditionals? Is the reason why we think we should preserve ordering that we expect it to be easier later to record which edges of the triangles are shared with the polygon? Regarding nested if/else statements, we don't seem to be interpreting the value of each bit independently, so maybe we should just have 2^3 constants instead that describe how to reconstruct the triangle from the box and the additional x,y coordinates, eg. {{public static final MINX_MINY_MAXX_MAXY_X_Y = 0}} instead of {{FIRST_BIT | SECOND_BIT | THIRD_BIT}}? > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16708434#comment-16708434 ] Ignacio Vera commented on LUCENE-8581: -- {quote}I think it would be good to keep the calls to encodeLatitude and encodeLongitude here. {quote} +1 {quote}Encoding should be orientation agnostic, but congruent (order preserved). I think we should remove the orientation dependency. {quote} I still think it is worthy to encode triangles always with the same orientation so we do not need to add that information for the encoding. I was having troubles in this part but now I think it was because a was working with the original triangle not with the encoded values. {quote}For maintenance I'd really like to reduce this tree of conditionals. {quote} I totally agree, I need to see which pattern can use here to improve readability. I attach a new version. It is missing documentation and maybe some test for the encoding. Just for my curiosity. when creating a triangle in the tessellator points get order. is that really needed? what is the purpose? {code:java} protected Triangle(Node a, Node b, Node c) { this.vertex = new Node[] {a, b, c}; // sort nodes by morton value Arrays.sort(this.vertex, (x, y) -> x.compareLat(y)); } {code} > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch, LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension
[ https://issues.apache.org/jira/browse/LUCENE-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16707612#comment-16707612 ] Nicholas Knize commented on LUCENE-8581: Thanks [~ivera] {{setTriangleValue((aLon), (aLat), (bLon), (bLat), (cLon), (cLat));}} I think it would be good to keep the calls to {{encodeLatitude}} and {{encodeLongitude}} here. The tessellator already encodes polygon triangles, so there's no need to call the encode methods twice. {{setTriangleValue(t.getLon(0), t.getLat(0), t.getLon(1), t.getLat(1), t.getLon(2), t.getLat(2));}} Just keep the calls to {{getEncodedX}} {{getEncodedY}} to unnecessarily encode twice. {code:java} int ccw = GeoUtils.orient(aLon, aLat, bLon, bLat, cLon, cLat); if (ccw == 1) { throw new IllegalArgumentException("Orientation of the triangle cannot be clock-wise"); }{code} Encoding should be orientation agnostic, but congruent (order preserved). I think we should remove the orientation dependency. {code:java} if (minY == aY && minX == aX) { ...{code} For maintenance I'd really like to reduce this tree of conditionals. Its pretty hard to follow. However, I think we could do that in a separate issue/patch iteration (this is in sandbox after all). For now, lets at least make sure this code is well documented so it's clear what's going on. > Change LatLonShape encoding to use 4 BYTES Per Dimension > > > Key: LUCENE-8581 > URL: https://issues.apache.org/jira/browse/LUCENE-8581 > Project: Lucene - Core > Issue Type: New Feature >Reporter: Nicholas Knize >Assignee: Ignacio Vera >Priority: Major > Attachments: LUCENE-8581.patch > > > {{LatLonShape}} tessellated triangles currently use a relatively naive > encoding with the first four dimensions as the bounding box of the triangle > and the last three dimensions as the vertices of the triangle. To encode the > {{x,y}} vertices in the last three dimensions requires {{bytesPerDim}} to be > set to 8, with 4 bytes for the x & y axis, respectively. We can reduce > {{bytesPerDim}} to 4 by encoding the index(es) of the vertices shared by the > bounding box along with the orientation of the triangle. This also opens the > door for supporting {{CONTAINS}} queries. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org