lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1894) Spatial checks for a string in an int,double map
Date Mon, 07 Sep 2009 16:14:57 GMT

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

Mark Miller commented on LUCENE-1894:
-------------------------------------

And whats this class? Spatial does not live up to the standard of quality that Lucene generally
delivers - contrib or not.


{code} 
/**
 *
 */
public class PolyShape {

  private static double lat = 38.969398; 
  private static double lng= -77.386398;
  private static int miles = 1000;
  /**
   * @param args
   */
  public static void main(String[] args) {
  
    CartesianPolyFilterBuilder cpf = new CartesianPolyFilterBuilder( "_localTier" );
    cpf.getBoxShape(lat, lng, miles);
    
  }

}

{code}

> Spatial checks for a string in an int,double map
> ------------------------------------------------
>
>                 Key: LUCENE-1894
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1894
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/spatial
>            Reporter: Mark Miller
>            Priority: Minor
>             Fix For: 2.9
>
>
> {code}
>   private Map<Integer,Double> distances;
> {code}
> {code}
>     if (precise != null) {
>       double xLat = getPrecision(lat, precise);
>       double xLng = getPrecision(lng, precise);
>       
>       String k = new Double(xLat).toString() +","+ new Double(xLng).toString();
>     
>       Double d = (distances.get(k));
>       if (d != null){
>         return d.doubleValue();
>       }
>     }
> {code}
> Something is off here eh?

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


Mime
View raw message