You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Chris Male (JIRA)" <ji...@apache.org> on 2009/12/11 15:14:18 UTC

[jira] Created: (LUCENE-2151) Abstract the distance calculation process in the Spatial contrib

Abstract the distance calculation process in the Spatial contrib
----------------------------------------------------------------

                 Key: LUCENE-2151
                 URL: https://issues.apache.org/jira/browse/LUCENE-2151
             Project: Lucene - Java
          Issue Type: Improvement
          Components: contrib/spatial
    Affects Versions: 3.1
            Reporter: Chris Male


The spatial contrib shouldn't tie users to one particular way of calculating distances.  Wikipedia lists multiple different formulas for the great-circle distance calculation, and there are alternatives to that as well.  In a situation where many documents have the same points, it would be useful to be able to cache some calculated values as well (currently this is sort of handled in the filtering process itself).  

This issue addresses this by abstracting away the distance calculator, allowing the user to provide the implementation of choice.  It would then be possible to swap in different distance calculation strategies without altering the distance filtering process itself.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2151) Abstract the distance calculation process in the Spatial contrib

Posted by "Chris Male (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Male updated LUCENE-2151:
-------------------------------

    Attachment: LUCENE-2151.patch

Attached patch that adds in the GeoDistanceCalculator interface, with 2 impls:

- ArcGeoDistanceCalculator (note it was known as ArcDistanceCalculator in previous patches, this addresses this inconsistency) - This calculator emulates the existing distance calculation algorithm.
- PlaneGeoDistanceCalculator - This calculator assumes the the earth is flat, and does simple trigonometry.  This obviously includes an error, but it maybe an error that is acceptable to some.

Tests for both impls are included

> Abstract the distance calculation process in the Spatial contrib
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2151
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2151
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/spatial
>    Affects Versions: 3.1
>            Reporter: Chris Male
>         Attachments: LUCENE-2151.patch
>
>
> The spatial contrib shouldn't tie users to one particular way of calculating distances.  Wikipedia lists multiple different formulas for the great-circle distance calculation, and there are alternatives to that as well.  In a situation where many documents have the same points, it would be useful to be able to cache some calculated values as well (currently this is sort of handled in the filtering process itself).  
> This issue addresses this by abstracting away the distance calculator, allowing the user to provide the implementation of choice.  It would then be possible to swap in different distance calculation strategies without altering the distance filtering process itself.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Assigned: (LUCENE-2151) Abstract the distance calculation process in the Spatial contrib

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Willnauer reassigned LUCENE-2151:
---------------------------------------

    Assignee: Simon Willnauer

> Abstract the distance calculation process in the Spatial contrib
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2151
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2151
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/spatial
>    Affects Versions: 3.1
>            Reporter: Chris Male
>            Assignee: Simon Willnauer
>         Attachments: LUCENE-2151.patch
>
>
> The spatial contrib shouldn't tie users to one particular way of calculating distances.  Wikipedia lists multiple different formulas for the great-circle distance calculation, and there are alternatives to that as well.  In a situation where many documents have the same points, it would be useful to be able to cache some calculated values as well (currently this is sort of handled in the filtering process itself).  
> This issue addresses this by abstracting away the distance calculator, allowing the user to provide the implementation of choice.  It would then be possible to swap in different distance calculation strategies without altering the distance filtering process itself.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2151) Abstract the distance calculation process in the Spatial contrib

Posted by "Chris Male (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Male updated LUCENE-2151:
-------------------------------

    Attachment: LUCENE-2151.patch

Updated patch so that it uses the DistanceUnits.convert instance method.

> Abstract the distance calculation process in the Spatial contrib
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2151
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2151
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/spatial
>    Affects Versions: 3.1
>            Reporter: Chris Male
>            Assignee: Simon Willnauer
>         Attachments: LUCENE-2151.patch, LUCENE-2151.patch
>
>
> The spatial contrib shouldn't tie users to one particular way of calculating distances.  Wikipedia lists multiple different formulas for the great-circle distance calculation, and there are alternatives to that as well.  In a situation where many documents have the same points, it would be useful to be able to cache some calculated values as well (currently this is sort of handled in the filtering process itself).  
> This issue addresses this by abstracting away the distance calculator, allowing the user to provide the implementation of choice.  It would then be possible to swap in different distance calculation strategies without altering the distance filtering process itself.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org