[jira] [Comment Edited] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension

2018-12-18 Thread Ignacio Vera (JIRA)


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

Ignacio Vera edited comment on LUCENE-8581 at 12/18/18 4:03 PM:


For some reason commits were not linked to the issue:

master:

d185ba99de0828bd31c2f6bcd74dc96fe8c6a452

 

branch_7x:

84fcfae3dc501e9fb1c777565aab0f9ca30cba

 


was (Author: ivera):
For some reason commits were not liken to the issue:

master:

d185ba99de0828bd31c2f6bcd74dc96fe8c6a452

 

branch_7x:

84fcfae3dc501e9fb1c777565aab0f9ca30cba

 

> 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] [Comment Edited] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension

2018-12-12 Thread Ignacio Vera (JIRA)


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

Ignacio Vera edited comment on LUCENE-8581 at 12/12/18 5:44 PM:


{quote}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?
{quote}
Yes, that is the idea because the differences are only numeric and they were 
showing in the tests for sub-atomic values. A good example is  
{{TestLatLonShape.testLUCENE8454}}, it will be a hit in CW and a non-hit in CCW.
{quote}simplify the encoding
{quote}
I got you, new patch rotates edges and indeed simplifies the logic.


was (Author: ivera):
{quote}
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?
{quote}

Yes, that is the idea because the differences are only numeric and they were 
showing in the tests for sub-atomic values.

{quote}
simplify the encoding
{quote}

I got you, new patch rotates edges and indeed simplifies the logic.


> 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
>
>
> {{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] [Comment Edited] (LUCENE-8581) Change LatLonShape encoding to use 4 BYTES Per Dimension

2018-12-08 Thread Ignacio Vera (JIRA)


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

Ignacio Vera edited comment on LUCENE-8581 at 12/9/18 7:37 AM:
---

New iteration over the patch. Main changes are:
 * Change LatLonShape tests to encode/decode the resulting triangles the same 
way LatLonShape does at index time to ensure orientation consistency.
 * Remove ordering logic for polygons (tessellator) and lines.
 * Improve readability of encoding logic following Adrien's recommendation.
 *  Add test for LatLonShapeEncoding


was (Author: ivera):
New iteration over the patch. Main changes are:
 * Change LatLonShape tests to encode/decode the resulting triangles the same 
way LatLonShape does at index time to ensure orientation consistency.
 * Remove ordering logic for polygons (tessellator) and lines.
 * Improve readability of encoding logic following Adrian's recommendation.
 *  Add test for LatLonShapeEncoding

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