Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 41005 invoked from network); 8 Aug 2009 01:01:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Aug 2009 01:01:40 -0000 Received: (qmail 58278 invoked by uid 500); 8 Aug 2009 01:01:47 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 58199 invoked by uid 500); 8 Aug 2009 01:01:46 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 58191 invoked by uid 99); 8 Aug 2009 01:01:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Aug 2009 01:01:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Aug 2009 01:01:37 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9269F29A0013 for ; Fri, 7 Aug 2009 18:01:15 -0700 (PDT) Message-ID: <63046774.1249693275598.JavaMail.jira@brutus> Date: Fri, 7 Aug 2009 18:01:15 -0700 (PDT) From: "Bill Bell (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Issue Comment Edited: (LUCENE-1781) Large distances in Spatial go beyond Prime MEridian In-Reply-To: <1056375306.1249429095027.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740798#action_12740798 ] Bill Bell edited comment on LUCENE-1781 at 8/7/09 5:59 PM: ----------------------------------------------------------- Everything is working except when you use a large area like 10000 miles. I get no results at this distance when crossing the anti-meridian (180 degrees). Most of the time this is fine, but specifically when -181 becomes 178 there appears to be an issue somewhere else in the code and nothing is returned. I believe this code is good, the issue is somewhere else. Maybe lower left is no longer lower left, and upper right is no longer upper right? The box is probably too big for the other algorithms. Not sure what else to check. How it is being used? Regardless this section appears right. Start here: ctr 39.3209801,-111.0937311 Distance: 7200 boxCorners: before norm 22.100623434197477,21.15746490712925 boxCorners: normLng 22.100623434197477,21.15746490712925 boxCorners: distance: d 7200.0 boxCorners: ctr 39.3209801,-111.0937311 boxCorners: normLat 22.100623434197477,21.15746490712925 boxCorners: before norm -43.22565169384456,-181.34791600031286 note -181 boxCorners: normLng -43.22565169384456,178.65208399968714 Note 178 boxCorners: distance: d 7200.0 boxCorners: ctr 39.3209801,-111.0937311 boxCorners: normLat -43.22565169384456,178.65208399968714 corner 1054.4155877284288 I do get results from Hawaii crossing this at 10,000 miles. This works: boxCorners: before norm 6.201324582593365,-0.012709669713800501 boxCorners: normLng 6.201324582593365,-0.012709669713800501 boxCorners: distance: d 10000.0 boxCorners: ctr 19.8986819,-155.6658568 boxCorners: normLat 6.201324582593365,-0.012709669713800501 boxCorners: before norm -41.508634930577436,-302.4840293070323 note -302 boxCorners: normLng -41.508634930577436,57.5159706929677 note 57 boxCorners: distance: d 10000.0 boxCorners: ctr 19.8986819,-155.6658568 boxCorners: normLat -41.508634930577436,57.5159706929677 corner 1464.4660940672625 Note: This does not get any results. Note the 4.815339955430126 difference. Very weird. boxCorners: distance: d 10500.0 boxCorners: ctr 19.8986819,-155.6658568 boxCorners: normLat 0.8114618951495843,4.815339955430126 boxCorners: before norm -37.88735182208723,-310.6222696081052 boxCorners: normLng -37.88735182208723,49.37773039189477 boxCorners: distance: d 10500.0 boxCorners: ctr 19.8986819,-155.6658568 boxCorners: normLat -37.88735182208723,49.37773039189477 corner 1537.6893987706253 was (Author: billnbell): Everything is working except when you use a large area like 10000 miles. I get no results at this distance when crossing the anti-meridian (180 degrees). Most of the time this is fine, but specifically when -181 becomes 178 there appears to be an issue somewhere else in the code and nothing is returned. I believe this code is good, the issue is somewhere else. Maybe lower left is no longer lower left, and upper right is no longer upper right? The box is probably too big for the other algorithms. Not sure what else to check. How it is being used? Regardless this section appears right. Start here: ctr 39.3209801,-111.0937311 Distance: 7200 boxCorners: before norm 22.100623434197477,21.15746490712925 boxCorners: normLng 22.100623434197477,21.15746490712925 boxCorners: distance: d 7200.0 boxCorners: ctr 39.3209801,-111.0937311 boxCorners: normLat 22.100623434197477,21.15746490712925 boxCorners: before norm -43.22565169384456,-181.34791600031286 note -181 boxCorners: normLng -43.22565169384456,178.65208399968714 Note 178 boxCorners: distance: d 7200.0 boxCorners: ctr 39.3209801,-111.0937311 boxCorners: normLat -43.22565169384456,178.65208399968714 corner 1054.4155877284288 I do get results from Hawaii crossing this at 10,000 miles. This works: boxCorners: before norm 6.201324582593365,-0.012709669713800501 boxCorners: normLng 6.201324582593365,-0.012709669713800501 boxCorners: distance: d 10000.0 boxCorners: ctr 19.8986819,-155.6658568 boxCorners: normLat 6.201324582593365,-0.012709669713800501 boxCorners: before norm -41.508634930577436,-302.4840293070323 note -302 boxCorners: normLng -41.508634930577436,57.5159706929677 note 57 boxCorners: distance: d 10000.0 boxCorners: ctr 19.8986819,-155.6658568 boxCorners: normLat -41.508634930577436,57.5159706929677 corner 1464.4660940672625 > Large distances in Spatial go beyond Prime MEridian > --------------------------------------------------- > > Key: LUCENE-1781 > URL: https://issues.apache.org/jira/browse/LUCENE-1781 > Project: Lucene - Java > Issue Type: Bug > Components: contrib/spatial > Affects Versions: 2.9 > Environment: All > Reporter: Bill Bell > Assignee: Michael McCandless > Fix For: 3.1 > > Attachments: LLRect.java, LLRect.java, LUCENE-1781.patch > > > http://amidev.kaango.com/solr/core0/select?fl=*&json.nl=map&wt=json&radius=5000&rows=20&lat=39.5500507&q=honda&qt=geo&long=-105.7820674 > Get an error when using Solr when distance is calculated for the boundary box past 90 degrees. > Aug 4, 2009 1:54:00 PM org.apache.solr.common.SolrException log > SEVERE: java.lang.IllegalArgumentException: Illegal lattitude value 93.1558669413734 > at org.apache.lucene.spatial.geometry.FloatLatLng.(FloatLatLng.java:26) > at org.apache.lucene.spatial.geometry.shape.LLRect.createBox(LLRect.java:93) > at org.apache.lucene.spatial.tier.DistanceUtils.getBoundary(DistanceUtils.java:50) > at org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder.getBoxShape(CartesianPolyFilterBuilder.java:47) > at org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder.getBoundingArea(CartesianPolyFilterBuilder.java:109) > at org.apache.lucene.spatial.tier.DistanceQueryBuilder.(DistanceQueryBuilder.java:61) > at com.pjaol.search.solr.component.LocalSolrQueryComponent.prepare(LocalSolrQueryComponent.java:151) > at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174) > at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1328) > at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:341) > at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:244) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) > at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857) > at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565) > at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509) > at java.lang.Thread.run(Thread.java:619) -- 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