You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2012/07/02 08:52:17 UTC
svn commit: r1356084 - in /lucene/dev/branches/branch_4x: ./ lucene/
lucene/spatial/ lucene/spatial/src/java/org/apache/lucene/spatial/query/
lucene/spatial/src/java/org/apache/lucene/spatial/vector/
lucene/spatial/src/test/org/apache/lucene/spatial/ l...
Author: dsmiley
Date: Mon Jul 2 06:52:16 2012
New Revision: 1356084
URL: http://svn.apache.org/viewvc?rev=1356084&view=rev
Log:
LUCENE-4157 Ported the Solr 3 spatial test to Lucene spatial. Did a few minor other things too.
Added:
lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java
- copied, changed from r1356081, lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java
Removed:
lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/TestSpatialPrefixField.java
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/lucene/ (props changed)
lucene/dev/branches/branch_4x/lucene/spatial/ (props changed)
lucene/dev/branches/branch_4x/lucene/spatial/src/java/org/apache/lucene/spatial/query/SpatialOperation.java
lucene/dev/branches/branch_4x/lucene/spatial/src/java/org/apache/lucene/spatial/vector/DistanceValueSource.java
Modified: lucene/dev/branches/branch_4x/lucene/spatial/src/java/org/apache/lucene/spatial/query/SpatialOperation.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/spatial/src/java/org/apache/lucene/spatial/query/SpatialOperation.java?rev=1356084&r1=1356083&r2=1356084&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/spatial/src/java/org/apache/lucene/spatial/query/SpatialOperation.java (original)
+++ lucene/dev/branches/branch_4x/lucene/spatial/src/java/org/apache/lucene/spatial/query/SpatialOperation.java Mon Jul 2 06:52:16 2012
@@ -25,6 +25,11 @@ import java.util.*;
/**
* A clause that compares a stored geometry to a supplied geometry.
*
+ * @see <a href="http://edndoc.esri.com/arcsde/9.1/general_topics/understand_spatial_relations.htm">
+ * ESRI's docs on spatial relations</a>
+ * @see <a href="http://docs.geoserver.org/latest/en/user/filter/ecql_reference.html#spatial-predicate">
+ * GeoServer ECQL Spatial Predicates</a>
+ *
* @lucene.experimental
*/
public class SpatialOperation implements Serializable {
Modified: lucene/dev/branches/branch_4x/lucene/spatial/src/java/org/apache/lucene/spatial/vector/DistanceValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/spatial/src/java/org/apache/lucene/spatial/vector/DistanceValueSource.java?rev=1356084&r1=1356083&r2=1356084&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/spatial/src/java/org/apache/lucene/spatial/vector/DistanceValueSource.java (original)
+++ lucene/dev/branches/branch_4x/lucene/spatial/src/java/org/apache/lucene/spatial/vector/DistanceValueSource.java Mon Jul 2 06:52:16 2012
@@ -1,3 +1,5 @@
+package org.apache.lucene.spatial.vector;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -15,11 +17,8 @@
* limitations under the License.
*/
-package org.apache.lucene.spatial.vector;
-
import com.spatial4j.core.distance.DistanceCalculator;
import com.spatial4j.core.shape.Point;
-import com.spatial4j.core.shape.simple.PointImpl;
import org.apache.lucene.index.AtomicReader;
import org.apache.lucene.index.AtomicReaderContext;
import org.apache.lucene.queries.function.FunctionValues;
@@ -84,8 +83,7 @@ public class DistanceValueSource extends
public double doubleVal(int doc) {
// make sure it has minX and area
if (validX.get(doc) && validY.get(doc)) {
- PointImpl pt = new PointImpl( ptX[doc], ptY[doc] );
- return calculator.distance(from, pt);
+ return calculator.distance(from, ptX[doc], ptY[doc]);
}
return 0;
}
Copied: lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java (from r1356081, lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java?p2=lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java&p1=lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java&r1=1356081&r2=1356084&rev=1356084&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java (original)
+++ lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java Mon Jul 2 06:52:16 2012
@@ -46,7 +46,6 @@ import java.util.Set;
/**
* Based off of Solr 3's SpatialFilterTest.
- * @author dsmiley
*/
public class PortedSolr3Test extends StrategyTestCase {