Strabon

changeset 795:bf41e1f04c52

* Modified stSPARQL extension function to comply with the OGC Simple Features Access
- removed functions covers and covered_by
- renamed function inside to within
- added function crosses
* Modified the TELEIOS scripts to comply with the new function names
* Modified the SpatialTests class (runtime) to comply with the new function names
- BUG (known issue): The functions sf-overlaps and sf-crosses are not implemented correctly.
We should modify the PostGISQueryBuilder to use the ST_Overlaps and the
ST_Crosses functions respectively.
- TODO Verify the tests using MonetDB as a spatially enabled back end.
author Kostis Kyzirakos <kkyzir@di.uoa.gr>
date Mon Dec 10 22:27:44 2012 +0200 (2012-12-10)
parents 4ac0390b1220
children fab420afc6c1
files evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/GeoConstants.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/ContainsFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/CoveredByFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/CoversFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/CrossesFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/InsideFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/OverlapFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/OverlapsFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/TouchFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/TouchesFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/WithinFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/mbb/MbbInsideFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/mbb/MbbWithinFunc.java evaluation/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function examples/teleios/refinePartialSeaHotspots.rq generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlCoveredBy.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlCovers.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlCrosses.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlInside.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlMbbInside.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlMbbWithin.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlOverlap.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlOverlaps.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlTouch.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlTouches.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBExprSupport.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBQueryModelVisitorBase.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBBooleanExprFactory.java generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBQueryBuilder.java monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBQueryBuilder.java postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java runtime/src/test/java/eu/earthobservatory/runtime/generaldb/SpatialTests.java runtime/src/test/resources/spatial-tests-srid.nt
line diff
     1.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/GeoConstants.java	Mon Dec 10 18:18:40 2012 +0200
     1.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/GeoConstants.java	Mon Dec 10 22:27:44 2012 +0200
     1.3 @@ -16,6 +16,7 @@
     1.4   * is assumed in Strabon.
     1.5   * 
     1.6   * @author Charalampos Nikolaou <charnik@di.uoa.gr>
     1.7 + * @author Kostis Kyzirakos <kkyzir@di.uoa.gr>
     1.8   */
     1.9  public class GeoConstants {
    1.10  	/**																		*
    1.11 @@ -73,27 +74,29 @@
    1.12  	 * 																		*/
    1.13  	// Spatial Relationships
    1.14  	public static final String anyInteract 		= stRDF + "anyInteract";
    1.15 +	public static final String equals 			= stRDF + "equals";
    1.16 +	public static final String disjoint 		= stRDF + "disjoint";
    1.17  	public static final String intersects 		= stRDF + "intersects";
    1.18 +	public static final String touches 			= stRDF + "touches";
    1.19 +	public static final String within 			= stRDF + "within";
    1.20  	public static final String contains 		= stRDF + "contains";
    1.21 -	public static final String within 			= stRDF + "within";
    1.22 -	public static final String coveredBy 		= stRDF + "coveredBy";
    1.23 -	public static final String covers 			= stRDF + "covers";
    1.24 -	public static final String disjoint 		= stRDF + "disjoint";
    1.25 -	public static final String equals 			= stRDF + "equals";
    1.26 -	public static final String inside 			= stRDF + "inside";
    1.27 -	public static final String overlap 			= stRDF + "overlap";
    1.28 -	public static final String touch 			= stRDF + "touch";
    1.29 +	public static final String overlaps 		= stRDF + "overlaps";
    1.30 +	public static final String crosses 			= stRDF + "crosses";
    1.31 +	
    1.32 +	// The generic relate function
    1.33  	public static final String relate 			= stRDF + "relate";
    1.34 +	
    1.35 +	// Topological Relationships utilizing mbb
    1.36 +	public static final String mbbOverlaps 		= stRDF + "mbbOverlaps";
    1.37 +	public static final String mbbContains 		= stRDF + "mbbContains";
    1.38 +	public static final String mbbEquals 		= stRDF + "mbbEquals";
    1.39 +	public static final String mbbWithin 		= stRDF + "mbbWithin";
    1.40 +	
    1.41 +	// Directional functions
    1.42  	public static final String left 			= stRDF + "left";
    1.43  	public static final String right			= stRDF + "right";
    1.44  	public static final String above 			= stRDF + "above";
    1.45  	public static final String below			= stRDF + "below";
    1.46 -	
    1.47 -	// Spatial Relationships utilizing mbb
    1.48 -	public static final String mbbOverlaps 	= stRDF + "mbbOverlaps";
    1.49 -	public static final String mbbContains 	= stRDF + "mbbContains";
    1.50 -	public static final String mbbEquals 	= stRDF + "mbbEquals";
    1.51 -	public static final String mbbInside 	= stRDF + "mbbInside";
    1.52  
    1.53  	// Spatial Constructs
    1.54  	public static final String union 			= stRDF + "union";
    1.55 @@ -171,6 +174,8 @@
    1.56  	public static final String rccTangentialProperPart 			 = geof + "rcc8-tpp";
    1.57  	public static final String rccNonTangentialProperPart 		 = geof + "rcc8-ntpp";
    1.58  	public static final String rccNonTangentialProperPartInverse = geof + "rcc8-ntppi";
    1.59 +	
    1.60 +	// The generic relate function
    1.61  	public static final String geoSparqlRelate 					 = geof + "relate";
    1.62  	
    1.63  }
     2.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/ContainsFunc.java	Mon Dec 10 18:18:40 2012 +0200
     2.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/ContainsFunc.java	Mon Dec 10 22:27:44 2012 +0200
     2.3 @@ -20,6 +20,6 @@
     2.4  
     2.5  	@Override
     2.6  	public String getURI() {
     2.7 -		return GeoConstants.contains;
     2.8 +		return GeoConstants.crosses;
     2.9  	}
    2.10  }
     3.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/CoveredByFunc.java	Mon Dec 10 18:18:40 2012 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,25 +0,0 @@
     3.4 -/**
     3.5 - * This Source Code Form is subject to the terms of the Mozilla Public
     3.6 - * License, v. 2.0. If a copy of the MPL was not distributed with this
     3.7 - * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     3.8 - * 
     3.9 - * Copyright (C) 2010, 2011, 2012, Pyravlos Team
    3.10 - * 
    3.11 - * http://www.strabon.di.uoa.gr/
    3.12 - */
    3.13 -package org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation;
    3.14 -
    3.15 -import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
    3.16 -import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
    3.17 - 
    3.18 -/**
    3.19 - * 
    3.20 - * @author Manos Karpathiotakis <mk@di.uoa.gr>
    3.21 - */
    3.22 -public class CoveredByFunc extends SpatialRelationshipFunc {
    3.23 -
    3.24 -	@Override
    3.25 -	public String getURI() {
    3.26 -		return GeoConstants.coveredBy;
    3.27 -	}
    3.28 -}
     4.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/CoversFunc.java	Mon Dec 10 18:18:40 2012 +0200
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,25 +0,0 @@
     4.4 -/**
     4.5 - * This Source Code Form is subject to the terms of the Mozilla Public
     4.6 - * License, v. 2.0. If a copy of the MPL was not distributed with this
     4.7 - * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     4.8 - * 
     4.9 - * Copyright (C) 2010, 2011, 2012, Pyravlos Team
    4.10 - * 
    4.11 - * http://www.strabon.di.uoa.gr/
    4.12 - */
    4.13 -package org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation;
    4.14 -
    4.15 -import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
    4.16 -import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
    4.17 - 
    4.18 -/**
    4.19 - * 
    4.20 - * @author Manos Karpathiotakis <mk@di.uoa.gr>
    4.21 - */
    4.22 -public class CoversFunc extends SpatialRelationshipFunc {
    4.23 -
    4.24 -	@Override
    4.25 -	public String getURI() {
    4.26 -		return GeoConstants.covers;
    4.27 -	}
    4.28 -}
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/CrossesFunc.java	Mon Dec 10 22:27:44 2012 +0200
     5.3 @@ -0,0 +1,25 @@
     5.4 +/**
     5.5 + * This Source Code Form is subject to the terms of the Mozilla Public
     5.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     5.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     5.8 + * 
     5.9 + * Copyright (C) 2010, 2011, 2012, Pyravlos Team
    5.10 + * 
    5.11 + * http://www.strabon.di.uoa.gr/
    5.12 + */
    5.13 +package org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation;
    5.14 +
    5.15 +import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
    5.16 +import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
    5.17 + 
    5.18 +/**
    5.19 + * 
    5.20 + * @author Manos Karpathiotakis <mk@di.uoa.gr>
    5.21 + */
    5.22 +public class CrossesFunc extends SpatialRelationshipFunc {
    5.23 +
    5.24 +	@Override
    5.25 +	public String getURI() {
    5.26 +		return GeoConstants.contains;
    5.27 +	}
    5.28 +}
     6.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/InsideFunc.java	Mon Dec 10 18:18:40 2012 +0200
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,25 +0,0 @@
     6.4 -/**
     6.5 - * This Source Code Form is subject to the terms of the Mozilla Public
     6.6 - * License, v. 2.0. If a copy of the MPL was not distributed with this
     6.7 - * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     6.8 - * 
     6.9 - * Copyright (C) 2010, 2011, 2012, Pyravlos Team
    6.10 - * 
    6.11 - * http://www.strabon.di.uoa.gr/
    6.12 - */
    6.13 -package org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation;
    6.14 -
    6.15 -import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
    6.16 -import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
    6.17 - 
    6.18 -/**
    6.19 - * 
    6.20 - * @author Manos Karpathiotakis <mk@di.uoa.gr>
    6.21 - */
    6.22 -public class InsideFunc extends SpatialRelationshipFunc {
    6.23 -
    6.24 -	@Override
    6.25 -	public String getURI() {
    6.26 -		return GeoConstants.within;
    6.27 -	}
    6.28 -}
     7.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/OverlapFunc.java	Mon Dec 10 18:18:40 2012 +0200
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,25 +0,0 @@
     7.4 -/**
     7.5 - * This Source Code Form is subject to the terms of the Mozilla Public
     7.6 - * License, v. 2.0. If a copy of the MPL was not distributed with this
     7.7 - * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     7.8 - * 
     7.9 - * Copyright (C) 2010, 2011, 2012, Pyravlos Team
    7.10 - * 
    7.11 - * http://www.strabon.di.uoa.gr/
    7.12 - */
    7.13 -package org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation;
    7.14 -
    7.15 -import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
    7.16 -import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
    7.17 - 
    7.18 -/**
    7.19 - * 
    7.20 - * @author Manos Karpathiotakis <mk@di.uoa.gr>
    7.21 - */
    7.22 -public class OverlapFunc extends SpatialRelationshipFunc {
    7.23 -
    7.24 -	@Override
    7.25 -	public String getURI() {
    7.26 -		return GeoConstants.overlap;
    7.27 -	}
    7.28 -}
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/OverlapsFunc.java	Mon Dec 10 22:27:44 2012 +0200
     8.3 @@ -0,0 +1,25 @@
     8.4 +/**
     8.5 + * This Source Code Form is subject to the terms of the Mozilla Public
     8.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     8.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     8.8 + * 
     8.9 + * Copyright (C) 2010, 2011, 2012, Pyravlos Team
    8.10 + * 
    8.11 + * http://www.strabon.di.uoa.gr/
    8.12 + */
    8.13 +package org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation;
    8.14 +
    8.15 +import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
    8.16 +import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
    8.17 + 
    8.18 +/**
    8.19 + * 
    8.20 + * @author Manos Karpathiotakis <mk@di.uoa.gr>
    8.21 + */
    8.22 +public class OverlapsFunc extends SpatialRelationshipFunc {
    8.23 +
    8.24 +	@Override
    8.25 +	public String getURI() {
    8.26 +		return GeoConstants.overlaps;
    8.27 +	}
    8.28 +}
     9.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/TouchFunc.java	Mon Dec 10 18:18:40 2012 +0200
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,25 +0,0 @@
     9.4 -/**
     9.5 - * This Source Code Form is subject to the terms of the Mozilla Public
     9.6 - * License, v. 2.0. If a copy of the MPL was not distributed with this
     9.7 - * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     9.8 - * 
     9.9 - * Copyright (C) 2010, 2011, 2012, Pyravlos Team
    9.10 - * 
    9.11 - * http://www.strabon.di.uoa.gr/
    9.12 - */
    9.13 -package org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation;
    9.14 -
    9.15 -import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
    9.16 -import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
    9.17 - 
    9.18 -/**
    9.19 - * 
    9.20 - * @author Manos Karpathiotakis <mk@di.uoa.gr>
    9.21 - */
    9.22 -public class TouchFunc extends SpatialRelationshipFunc {
    9.23 -
    9.24 -	@Override
    9.25 -	public String getURI() {
    9.26 -		return GeoConstants.touch;
    9.27 -	}
    9.28 -}
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/TouchesFunc.java	Mon Dec 10 22:27:44 2012 +0200
    10.3 @@ -0,0 +1,25 @@
    10.4 +/**
    10.5 + * This Source Code Form is subject to the terms of the Mozilla Public
    10.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
    10.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    10.8 + * 
    10.9 + * Copyright (C) 2010, 2011, 2012, Pyravlos Team
   10.10 + * 
   10.11 + * http://www.strabon.di.uoa.gr/
   10.12 + */
   10.13 +package org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation;
   10.14 +
   10.15 +import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
   10.16 +import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
   10.17 + 
   10.18 +/**
   10.19 + * 
   10.20 + * @author Manos Karpathiotakis <mk@di.uoa.gr>
   10.21 + */
   10.22 +public class TouchesFunc extends SpatialRelationshipFunc {
   10.23 +
   10.24 +	@Override
   10.25 +	public String getURI() {
   10.26 +		return GeoConstants.touches;
   10.27 +	}
   10.28 +}
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/WithinFunc.java	Mon Dec 10 22:27:44 2012 +0200
    11.3 @@ -0,0 +1,25 @@
    11.4 +/**
    11.5 + * This Source Code Form is subject to the terms of the Mozilla Public
    11.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
    11.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    11.8 + * 
    11.9 + * Copyright (C) 2010, 2011, 2012, Pyravlos Team
   11.10 + * 
   11.11 + * http://www.strabon.di.uoa.gr/
   11.12 + */
   11.13 +package org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation;
   11.14 +
   11.15 +import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
   11.16 +import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
   11.17 + 
   11.18 +/**
   11.19 + * 
   11.20 + * @author Manos Karpathiotakis <mk@di.uoa.gr>
   11.21 + */
   11.22 +public class WithinFunc extends SpatialRelationshipFunc {
   11.23 +
   11.24 +	@Override
   11.25 +	public String getURI() {
   11.26 +		return GeoConstants.within;
   11.27 +	}
   11.28 +}
    12.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/mbb/MbbInsideFunc.java	Mon Dec 10 18:18:40 2012 +0200
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,26 +0,0 @@
    12.4 -/**
    12.5 - * This Source Code Form is subject to the terms of the Mozilla Public
    12.6 - * License, v. 2.0. If a copy of the MPL was not distributed with this
    12.7 - * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    12.8 - * 
    12.9 - * Copyright (C) 2010, 2011, 2012, Pyravlos Team
   12.10 - * 
   12.11 - * http://www.strabon.di.uoa.gr/
   12.12 - */
   12.13 -package org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb;
   12.14 -
   12.15 -import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
   12.16 -import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
   12.17 -
   12.18 -/**
   12.19 - * 
   12.20 - * @author Manos Karpathiotakis <mk@di.uoa.gr>
   12.21 - */
   12.22 -public class MbbInsideFunc extends SpatialRelationshipFunc {
   12.23 -
   12.24 -	@Override
   12.25 -	public String getURI() {
   12.26 -		return GeoConstants.mbbInside;
   12.27 -	}
   12.28 -
   12.29 -}
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/spatial/stsparql/relation/mbb/MbbWithinFunc.java	Mon Dec 10 22:27:44 2012 +0200
    13.3 @@ -0,0 +1,26 @@
    13.4 +/**
    13.5 + * This Source Code Form is subject to the terms of the Mozilla Public
    13.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
    13.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    13.8 + * 
    13.9 + * Copyright (C) 2010, 2011, 2012, Pyravlos Team
   13.10 + * 
   13.11 + * http://www.strabon.di.uoa.gr/
   13.12 + */
   13.13 +package org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb;
   13.14 +
   13.15 +import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
   13.16 +import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
   13.17 +
   13.18 +/**
   13.19 + * 
   13.20 + * @author Manos Karpathiotakis <mk@di.uoa.gr>
   13.21 + */
   13.22 +public class MbbWithinFunc extends SpatialRelationshipFunc {
   13.23 +
   13.24 +	@Override
   13.25 +	public String getURI() {
   13.26 +		return GeoConstants.mbbWithin;
   13.27 +	}
   13.28 +
   13.29 +}
    14.1 --- a/evaluation/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function	Mon Dec 10 18:18:40 2012 +0200
    14.2 +++ b/evaluation/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function	Mon Dec 10 22:27:44 2012 +0200
    14.3 @@ -9,18 +9,17 @@
    14.4  org.openrdf.query.algebra.evaluation.function.link.AddDateTimeFunc
    14.5  org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb.MbbIntersectsFunc
    14.6  org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb.MbbContainsFunc
    14.7 -org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb.MbbInsideFunc
    14.8 +org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb.MbbWithinFunc
    14.9  org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb.MbbEqualsFunc
   14.10 +org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.AnyInteractFunc
   14.11 +org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.EqualsFunc
   14.12 +org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.DisjointFunc
   14.13  org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.IntersectsFunc
   14.14 -org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.AnyInteractFunc
   14.15 +org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.TouchesFunc
   14.16 +org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.CrossesFunc
   14.17 +org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.WithinFunc
   14.18  org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.ContainsFunc
   14.19 -org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.CoveredByFunc
   14.20 -org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.CoversFunc
   14.21 -org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.DisjointFunc
   14.22 -org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.EqualsFunc
   14.23 -org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.InsideFunc
   14.24 -org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.OverlapFunc
   14.25 -org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.TouchFunc
   14.26 +org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.OverlapsFunc
   14.27  org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.RelateFunc
   14.28  org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.LeftFunc
   14.29  org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.RightFunc
   14.30 @@ -79,4 +78,4 @@
   14.31  org.openrdf.query.algebra.evaluation.function.spatial.geosparql.sf.SimpleFeaturesIntersectsFunc
   14.32  org.openrdf.query.algebra.evaluation.function.spatial.geosparql.sf.SimpleFeaturesOverlapsFunc
   14.33  org.openrdf.query.algebra.evaluation.function.spatial.geosparql.sf.SimpleFeaturesWithinFunc
   14.34 -org.openrdf.query.algebra.evaluation.function.spatial.geosparql.sf.SimpleFeatureTouchesFunc
   14.35 \ No newline at end of file
   14.36 +org.openrdf.query.algebra.evaluation.function.spatial.geosparql.sf.SimpleFeatureTouchesFunc
    15.1 --- a/examples/teleios/refinePartialSeaHotspots.rq	Mon Dec 10 18:18:40 2012 +0200
    15.2 +++ b/examples/teleios/refinePartialSeaHotspots.rq	Mon Dec 10 22:27:44 2012 +0200
    15.3 @@ -34,5 +34,5 @@
    15.4  	OPTIONAL { ?h noa:refinedBy ?refined } .
    15.5    }
    15.6    GROUP BY ?h ?hGeo ?conf ?muni
    15.7 -  HAVING strdf:overlap(?hGeo, strdf:union(?cGeo))
    15.8 +  HAVING strdf:overlaps(?hGeo, strdf:union(?cGeo))
    15.9  }
    16.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlCoveredBy.java	Mon Dec 10 18:18:40 2012 +0200
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,20 +0,0 @@
    16.4 -/*
    16.5 - * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
    16.6 - *
    16.7 - * Licensed under the Aduna BSD-style license.
    16.8 - */
    16.9 -package org.openrdf.sail.generaldb.algebra;
   16.10 -
   16.11 - 
   16.12 -import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator; 
   16.13 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
   16.14 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
   16.15 -
   16.16 -public class GeneralDBSqlCoveredBy extends GeneralDBSqlGeoSpatial{
   16.17 -
   16.18 -	public GeneralDBSqlCoveredBy(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   16.19 -		super(left, right);
   16.20 -	}
   16.21 - 
   16.22 -
   16.23 -}
   16.24 \ No newline at end of file
    17.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlCovers.java	Mon Dec 10 18:18:40 2012 +0200
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,20 +0,0 @@
    17.4 -/*
    17.5 - * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
    17.6 - *
    17.7 - * Licensed under the Aduna BSD-style license.
    17.8 - */
    17.9 -package org.openrdf.sail.generaldb.algebra;
   17.10 -
   17.11 - 
   17.12 -import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator; 
   17.13 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
   17.14 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
   17.15 -
   17.16 -public class GeneralDBSqlCovers extends GeneralDBSqlGeoSpatial{
   17.17 -
   17.18 -	public GeneralDBSqlCovers(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   17.19 -		super(left, right);
   17.20 -	}
   17.21 -
   17.22 - 
   17.23 -}
   17.24 \ No newline at end of file
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlCrosses.java	Mon Dec 10 22:27:44 2012 +0200
    18.3 @@ -0,0 +1,20 @@
    18.4 +/*
    18.5 + * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
    18.6 + *
    18.7 + * Licensed under the Aduna BSD-style license.
    18.8 + */
    18.9 +package org.openrdf.sail.generaldb.algebra;
   18.10 +
   18.11 + 
   18.12 +import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator; 
   18.13 +import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
   18.14 +import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
   18.15 +
   18.16 +public class GeneralDBSqlCrosses extends GeneralDBSqlGeoSpatial{
   18.17 +
   18.18 +	public GeneralDBSqlCrosses(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   18.19 +		super(left, right);
   18.20 +	}
   18.21 +
   18.22 + 
   18.23 +}
   18.24 \ No newline at end of file
    19.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlInside.java	Mon Dec 10 18:18:40 2012 +0200
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,21 +0,0 @@
    19.4 -/*
    19.5 - * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
    19.6 - *
    19.7 - * Licensed under the Aduna BSD-style license.
    19.8 - */
    19.9 -package org.openrdf.sail.generaldb.algebra;
   19.10 -
   19.11 - 
   19.12 -import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator; 
   19.13 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
   19.14 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
   19.15 -
   19.16 -public class GeneralDBSqlInside extends GeneralDBSqlGeoSpatial{
   19.17 -
   19.18 -	public GeneralDBSqlInside(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   19.19 -		super(left, right);
   19.20 -	}
   19.21 -
   19.22 -	 
   19.23 -
   19.24 -}
   19.25 \ No newline at end of file
    20.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlMbbInside.java	Mon Dec 10 18:18:40 2012 +0200
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,19 +0,0 @@
    20.4 -/*
    20.5 - * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
    20.6 - *
    20.7 - * Licensed under the Aduna BSD-style license.
    20.8 - */
    20.9 -package org.openrdf.sail.generaldb.algebra;
   20.10 -
   20.11 - 
   20.12 -import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator; 
   20.13 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
   20.14 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
   20.15 -
   20.16 -public class GeneralDBSqlMbbInside extends GeneralDBSqlGeoSpatial{
   20.17 -
   20.18 -	public GeneralDBSqlMbbInside(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   20.19 -		super(left, right);
   20.20 -	}
   20.21 -
   20.22 -}
   20.23 \ No newline at end of file
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlMbbWithin.java	Mon Dec 10 22:27:44 2012 +0200
    21.3 @@ -0,0 +1,19 @@
    21.4 +/*
    21.5 + * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
    21.6 + *
    21.7 + * Licensed under the Aduna BSD-style license.
    21.8 + */
    21.9 +package org.openrdf.sail.generaldb.algebra;
   21.10 +
   21.11 + 
   21.12 +import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator; 
   21.13 +import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
   21.14 +import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
   21.15 +
   21.16 +public class GeneralDBSqlMbbWithin extends GeneralDBSqlGeoSpatial{
   21.17 +
   21.18 +	public GeneralDBSqlMbbWithin(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   21.19 +		super(left, right);
   21.20 +	}
   21.21 +
   21.22 +}
   21.23 \ No newline at end of file
    22.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlOverlap.java	Mon Dec 10 18:18:40 2012 +0200
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,20 +0,0 @@
    22.4 -/*
    22.5 - * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
    22.6 - *
    22.7 - * Licensed under the Aduna BSD-style license.
    22.8 - */
    22.9 -package org.openrdf.sail.generaldb.algebra;
   22.10 -
   22.11 - 
   22.12 -import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator; 
   22.13 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
   22.14 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
   22.15 -
   22.16 -public class GeneralDBSqlOverlap extends GeneralDBSqlGeoSpatial{
   22.17 -
   22.18 -	public GeneralDBSqlOverlap(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   22.19 -		super(left, right);
   22.20 -	}
   22.21 -
   22.22 -	 
   22.23 -}
   22.24 \ No newline at end of file
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlOverlaps.java	Mon Dec 10 22:27:44 2012 +0200
    23.3 @@ -0,0 +1,20 @@
    23.4 +/*
    23.5 + * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
    23.6 + *
    23.7 + * Licensed under the Aduna BSD-style license.
    23.8 + */
    23.9 +package org.openrdf.sail.generaldb.algebra;
   23.10 +
   23.11 + 
   23.12 +import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator; 
   23.13 +import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
   23.14 +import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
   23.15 +
   23.16 +public class GeneralDBSqlOverlaps extends GeneralDBSqlGeoSpatial{
   23.17 +
   23.18 +	public GeneralDBSqlOverlaps(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   23.19 +		super(left, right);
   23.20 +	}
   23.21 +
   23.22 +	 
   23.23 +}
   23.24 \ No newline at end of file
    24.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlTouch.java	Mon Dec 10 18:18:40 2012 +0200
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,20 +0,0 @@
    24.4 -/*
    24.5 - * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
    24.6 - *
    24.7 - * Licensed under the Aduna BSD-style license.
    24.8 - */
    24.9 -package org.openrdf.sail.generaldb.algebra;
   24.10 -
   24.11 - 
   24.12 -import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator; 
   24.13 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
   24.14 -import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
   24.15 -
   24.16 -public class GeneralDBSqlTouch extends GeneralDBSqlGeoSpatial{
   24.17 -
   24.18 -	public GeneralDBSqlTouch(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   24.19 -		super(left, right);
   24.20 -	}
   24.21 -
   24.22 - 
   24.23 -}
   24.24 \ No newline at end of file
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlTouches.java	Mon Dec 10 22:27:44 2012 +0200
    25.3 @@ -0,0 +1,20 @@
    25.4 +/*
    25.5 + * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
    25.6 + *
    25.7 + * Licensed under the Aduna BSD-style license.
    25.8 + */
    25.9 +package org.openrdf.sail.generaldb.algebra;
   25.10 +
   25.11 + 
   25.12 +import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator; 
   25.13 +import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
   25.14 +import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
   25.15 +
   25.16 +public class GeneralDBSqlTouches extends GeneralDBSqlGeoSpatial{
   25.17 +
   25.18 +	public GeneralDBSqlTouches(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   25.19 +		super(left, right);
   25.20 +	}
   25.21 +
   25.22 + 
   25.23 +}
   25.24 \ No newline at end of file
    26.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBExprSupport.java	Mon Dec 10 18:18:40 2012 +0200
    26.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBExprSupport.java	Mon Dec 10 22:27:44 2012 +0200
    26.3 @@ -24,8 +24,7 @@
    26.4  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlConcat;
    26.5  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlContains;
    26.6  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlContainsMBB;
    26.7 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCoveredBy;
    26.8 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCovers;
    26.9 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCrosses;
   26.10  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlDisjoint;
   26.11  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlEq;
   26.12  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlEqualsSpatial;
   26.13 @@ -47,7 +46,6 @@
   26.14  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoSymDifference;
   26.15  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoTransform;
   26.16  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoUnion;
   26.17 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlInside;
   26.18  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlIntersects;
   26.19  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlIsNull;
   26.20  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlLeft;
   26.21 @@ -55,16 +53,17 @@
   26.22  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlLowerCase;
   26.23  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMathExpr;
   26.24  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbEquals;
   26.25 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbInside;
   26.26 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbWithin;
   26.27  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbIntersects;
   26.28  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlNot;
   26.29  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlNull;
   26.30  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOr;
   26.31 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOverlap;
   26.32 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOverlaps;
   26.33  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlRegex;
   26.34  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlRelate;
   26.35  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlRight;
   26.36 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlTouch;
   26.37 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlTouches;
   26.38 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlWithin;
   26.39  import org.openrdf.sail.generaldb.algebra.GeneralDBStringValue;
   26.40  import org.openrdf.sail.generaldb.algebra.egenhofer.GeneralDBSqlEgenhofer_Contains;
   26.41  import org.openrdf.sail.generaldb.algebra.egenhofer.GeneralDBSqlEgenhofer_CoveredBy;
   26.42 @@ -279,62 +278,62 @@
   26.43  	public static GeneralDBSqlExpr anyInteract(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.44  		return new GeneralDBSqlAnyInteract(left, right);
   26.45  	}
   26.46 -
   26.47 +	
   26.48 +	public static GeneralDBSqlExpr equalsGeo(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.49 +		return new GeneralDBSqlEqualsSpatial(left, right);
   26.50 +	}
   26.51 +	
   26.52  	public static GeneralDBSqlExpr disjoint(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.53  		return new GeneralDBSqlDisjoint(left, right);
   26.54  	}
   26.55 -
   26.56 -	public static GeneralDBSqlExpr touch(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.57 -		return new GeneralDBSqlTouch(left, right);
   26.58 -	}
   26.59  	
   26.60  	public static GeneralDBSqlExpr intersects(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.61  		return new GeneralDBSqlIntersects(left, right);
   26.62  	}
   26.63  	
   26.64 -	public static GeneralDBSqlExpr mbbIntersects(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.65 -		return new GeneralDBSqlMbbIntersects(left, right);
   26.66 -	}
   26.67 -	public static GeneralDBSqlExpr mbbInside(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.68 -		return new GeneralDBSqlMbbInside(left, right);
   26.69 -	}
   26.70 -	public static GeneralDBSqlExpr ContainsMBB(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.71 -		return new GeneralDBSqlContainsMBB(left, right);
   26.72 +	public static GeneralDBSqlExpr touches(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.73 +		return new GeneralDBSqlTouches(left, right);
   26.74  	}
   26.75  	
   26.76 +	public static GeneralDBSqlExpr crosses(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.77 +		return new GeneralDBSqlCrosses(left, right);
   26.78 +	}
   26.79  	
   26.80 -	public static GeneralDBSqlExpr mbbEqualsGeo(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.81 -		return new GeneralDBSqlMbbEquals(left, right);
   26.82 +	public static GeneralDBSqlExpr within(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.83 +		return new GeneralDBSqlWithin(left, right);
   26.84  	}
   26.85 -
   26.86 -	public static GeneralDBSqlExpr equalsGeo(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.87 -		return new GeneralDBSqlEqualsSpatial(left, right);
   26.88 -	}
   26.89 -
   26.90 +	
   26.91  	public static GeneralDBSqlExpr contains(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.92  		return new GeneralDBSqlContains(left, right);
   26.93  	}
   26.94 -
   26.95 -	public static GeneralDBSqlExpr covers(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   26.96 -		return new GeneralDBSqlCovers(left, right);
   26.97 -	}
   26.98 -
   26.99 -	public static GeneralDBSqlExpr inside(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  26.100 -		return new GeneralDBSqlInside(left, right);
  26.101 -	}
  26.102 -
  26.103 -	public static GeneralDBSqlExpr coveredBy(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  26.104 -		return new GeneralDBSqlCoveredBy(left, right);
  26.105 -	}
  26.106 -
  26.107 -	public static GeneralDBSqlExpr overlap(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  26.108 -		return new GeneralDBSqlOverlap(left, right);
  26.109 +	
  26.110 +	public static GeneralDBSqlExpr overlaps(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  26.111 +		return new GeneralDBSqlOverlaps(left, right);
  26.112  	}
  26.113  
  26.114  	public static GeneralDBSqlExpr relate(GeneralDBSqlExpr left, GeneralDBSqlExpr right, GeneralDBSqlExpr third) {
  26.115  		return new GeneralDBSqlRelate(left, right,third);
  26.116  	}
  26.117  	
  26.118 +	// mbb functions
  26.119 +	
  26.120 +	public static GeneralDBSqlExpr mbbIntersects(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  26.121 +		return new GeneralDBSqlMbbIntersects(left, right);
  26.122 +	}
  26.123 +	public static GeneralDBSqlExpr mbbWithin(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  26.124 +		return new GeneralDBSqlMbbWithin(left, right);
  26.125 +	}
  26.126 +		
  26.127 +	public static GeneralDBSqlExpr mbbEqualsGeo(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  26.128 +		return new GeneralDBSqlMbbEquals(left, right);
  26.129 +	}
  26.130 +
  26.131 +	public static GeneralDBSqlExpr ContainsMBB(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  26.132 +		return new GeneralDBSqlContainsMBB(left, right);
  26.133 +	}
  26.134 +	
  26.135 +	// directional
  26.136 +	
  26.137  	public static GeneralDBSqlExpr left(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  26.138  		return new GeneralDBSqlLeft(left, right);
  26.139  	}
    27.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBQueryModelVisitorBase.java	Mon Dec 10 18:18:40 2012 +0200
    27.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBQueryModelVisitorBase.java	Mon Dec 10 22:27:44 2012 +0200
    27.3 @@ -25,19 +25,12 @@
    27.4  import org.openrdf.sail.generaldb.algebra.GeneralDBSelectQuery;
    27.5  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlAbs;
    27.6  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlAnd;
    27.7 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlAnyInteract;
    27.8  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCase;
    27.9  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCast;
   27.10  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCompare;
   27.11  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlConcat;
   27.12 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlContains;
   27.13 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCoveredBy;
   27.14 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCovers;
   27.15 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlDisjoint;
   27.16  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlEq;
   27.17 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlEqualsSpatial;
   27.18  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoSpatial;
   27.19 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlInside;
   27.20  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlIsNull;
   27.21  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlLike;
   27.22  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlLowerCase;
   27.23 @@ -45,7 +38,6 @@
   27.24  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlNot;
   27.25  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlNull;
   27.26  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOr;
   27.27 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOverlap;
   27.28  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlRegex;
   27.29  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlShift;
   27.30  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialConstructBinary;
   27.31 @@ -53,7 +45,6 @@
   27.32  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialMetricBinary;
   27.33  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialMetricUnary;
   27.34  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialProperty;
   27.35 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlTouch;
   27.36  import org.openrdf.sail.generaldb.algebra.GeneralDBStringValue;
   27.37  import org.openrdf.sail.generaldb.algebra.GeneralDBTrueValue;
   27.38  import org.openrdf.sail.generaldb.algebra.GeneralDBURIColumn;
    28.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBBooleanExprFactory.java	Mon Dec 10 18:18:40 2012 +0200
    28.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBBooleanExprFactory.java	Mon Dec 10 22:27:44 2012 +0200
    28.3 @@ -872,46 +872,44 @@
    28.4  		{
    28.5  			return anyInteract(leftArg,rightArg);
    28.6  		}
    28.7 -		if(function.getURI().equals(GeoConstants.intersects))
    28.8 +		
    28.9 +		if(function.getURI().equals(GeoConstants.equals))
   28.10  		{
   28.11 -			return intersects(leftArg,rightArg);
   28.12 -		}
   28.13 -		else if(function.getURI().equals(GeoConstants.contains))
   28.14 -		{
   28.15 -			return contains(leftArg,rightArg);
   28.16 -		}
   28.17 -		else if(function.getURI().equals(GeoConstants.coveredBy))
   28.18 -		{
   28.19 -			return coveredBy(leftArg,rightArg);
   28.20 -		}
   28.21 -		else if(function.getURI().equals(GeoConstants.covers))
   28.22 -		{
   28.23 -			return covers(leftArg,rightArg);
   28.24 +			return equalsGeo(leftArg,rightArg);
   28.25  		}
   28.26  		else if(function.getURI().equals(GeoConstants.disjoint))
   28.27  		{
   28.28  			return disjoint(leftArg,rightArg);
   28.29  		}
   28.30 -		else if(function.getURI().equals(GeoConstants.equals))
   28.31 +		else if(function.getURI().equals(GeoConstants.intersects))
   28.32  		{
   28.33 -			return equalsGeo(leftArg,rightArg);
   28.34 +			return intersects(leftArg,rightArg);
   28.35 +		}
   28.36 +		else if(function.getURI().equals(GeoConstants.touches))
   28.37 +		{
   28.38 +			return touches(leftArg,rightArg);
   28.39 +		}
   28.40 +		else if(function.getURI().equals(GeoConstants.crosses))
   28.41 +		{
   28.42 +			return crosses(leftArg,rightArg);
   28.43  		}
   28.44  		else if(function.getURI().equals(GeoConstants.within))
   28.45  		{
   28.46 -			return inside(leftArg,rightArg);
   28.47 +			return within(leftArg,rightArg);
   28.48  		}
   28.49 -		else if(function.getURI().equals(GeoConstants.overlap))
   28.50 +		else if(function.getURI().equals(GeoConstants.contains))
   28.51  		{
   28.52 -			return overlap(leftArg,rightArg);
   28.53 -		}
   28.54 -		else if(function.getURI().equals(GeoConstants.touch))
   28.55 +			return contains(leftArg,rightArg);
   28.56 +		}		
   28.57 +		else if(function.getURI().equals(GeoConstants.overlaps))
   28.58  		{
   28.59 -			return touch(leftArg,rightArg);
   28.60 -		}
   28.61 +			return overlaps(leftArg,rightArg);
   28.62 +		}		
   28.63  		else if(function.getURI().equals(GeoConstants.relate))
   28.64  		{
   28.65  			return relate(leftArg,rightArg,thirdArg);
   28.66  		}
   28.67 +		// directional
   28.68  		else if(function.getURI().equals(GeoConstants.left))
   28.69  		{
   28.70  			return left(leftArg,rightArg);
   28.71 @@ -928,17 +926,14 @@
   28.72  		{
   28.73  			return below(leftArg,rightArg);
   28.74  		}
   28.75 -		else if(function.getURI().equals(GeoConstants.touch))
   28.76 -		{
   28.77 -			return touch(leftArg,rightArg);
   28.78 -		}
   28.79 +		// mbb
   28.80  		else if(function.getURI().equals(GeoConstants.mbbOverlaps))
   28.81  		{
   28.82  			return mbbIntersects(leftArg,rightArg);
   28.83  		}
   28.84 -		else if(function.getURI().equals(GeoConstants.mbbInside))
   28.85 +		else if(function.getURI().equals(GeoConstants.mbbWithin))
   28.86  		{
   28.87 -			return mbbInside(leftArg,rightArg);
   28.88 +			return mbbWithin(leftArg,rightArg);
   28.89  		}
   28.90  		else if(function.getURI().equals(GeoConstants.mbbContains))
   28.91  		{
    29.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Mon Dec 10 18:18:40 2012 +0200
    29.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Mon Dec 10 22:27:44 2012 +0200
    29.3 @@ -46,19 +46,18 @@
    29.4  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.AnyInteractFunc;
    29.5  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.BelowFunc;
    29.6  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.ContainsFunc;
    29.7 -import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.CoveredByFunc;
    29.8 -import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.CoversFunc;
    29.9 +import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.CrossesFunc;
   29.10  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.DisjointFunc;
   29.11  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.EqualsFunc;
   29.12 -import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.InsideFunc;
   29.13 +import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.WithinFunc;
   29.14  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.IntersectsFunc;
   29.15  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.LeftFunc;
   29.16 -import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.OverlapFunc;
   29.17 +import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.OverlapsFunc;
   29.18  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.RightFunc;
   29.19 -import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.TouchFunc;
   29.20 +import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.TouchesFunc;
   29.21  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb.MbbContainsFunc;
   29.22  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb.MbbEqualsFunc;
   29.23 -import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb.MbbInsideFunc;
   29.24 +import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb.MbbWithinFunc;
   29.25  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.mbb.MbbIntersectsFunc;
   29.26  import org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl;
   29.27  import org.openrdf.query.algebra.evaluation.iterator.OrderIterator;
   29.28 @@ -385,19 +384,12 @@
   29.29  					Geometry rightConverted = JTSWrapper.getInstance().transform(rightGeom, sourceSRID, targetSRID);
   29.30  					funcResult = leftGeom.contains(rightConverted);
   29.31  				}
   29.32 -				else if(function instanceof CoveredByFunc)
   29.33 +				else if(function instanceof CrossesFunc)
   29.34  				{
   29.35  					int targetSRID = leftGeom.getSRID();
   29.36  					int sourceSRID = rightGeom.getSRID();
   29.37  					Geometry rightConverted = JTSWrapper.getInstance().transform(rightGeom, sourceSRID, targetSRID);
   29.38 -					funcResult = leftGeom.coveredBy(rightConverted);
   29.39 -				}
   29.40 -				else if(function instanceof CoversFunc)
   29.41 -				{
   29.42 -					int targetSRID = leftGeom.getSRID();
   29.43 -					int sourceSRID = rightGeom.getSRID();
   29.44 -					Geometry rightConverted = JTSWrapper.getInstance().transform(rightGeom, sourceSRID, targetSRID);
   29.45 -					funcResult = leftGeom.covers(rightConverted);
   29.46 +					funcResult = leftGeom.crosses(rightConverted);
   29.47  				}
   29.48  				else if(function instanceof DisjointFunc)
   29.49  				{
   29.50 @@ -413,7 +405,7 @@
   29.51  					Geometry rightConverted = JTSWrapper.getInstance().transform(rightGeom, sourceSRID, targetSRID);
   29.52  					funcResult = leftGeom.equals(rightConverted);
   29.53  				}
   29.54 -				else if(function instanceof InsideFunc)
   29.55 +				else if(function instanceof WithinFunc)
   29.56  				{
   29.57  					int targetSRID = leftGeom.getSRID();
   29.58  					int sourceSRID = rightGeom.getSRID();
   29.59 @@ -427,7 +419,7 @@
   29.60  					Geometry rightConverted = JTSWrapper.getInstance().transform(rightGeom, sourceSRID, targetSRID);
   29.61  					funcResult = leftGeom.getEnvelopeInternal().getMaxX() < rightConverted.getEnvelopeInternal().getMinX();
   29.62  				}
   29.63 -				else if(function instanceof OverlapFunc)
   29.64 +				else if(function instanceof OverlapsFunc)
   29.65  				{
   29.66  					int targetSRID = leftGeom.getSRID();
   29.67  					int sourceSRID = rightGeom.getSRID();
   29.68 @@ -441,7 +433,7 @@
   29.69  					Geometry rightConverted = JTSWrapper.getInstance().transform(rightGeom, sourceSRID, targetSRID);
   29.70  					funcResult = leftGeom.getEnvelopeInternal().getMinX() > rightConverted.getEnvelopeInternal().getMaxX();
   29.71  				}
   29.72 -				else if(function instanceof TouchFunc)
   29.73 +				else if(function instanceof TouchesFunc)
   29.74  				{
   29.75  					int targetSRID = leftGeom.getSRID();
   29.76  					int sourceSRID = rightGeom.getSRID();
   29.77 @@ -456,7 +448,7 @@
   29.78  					Geometry rightConverted = JTSWrapper.getInstance().transform(rightGeom, sourceSRID, targetSRID);
   29.79  					funcResult = leftGeom.getEnvelope().intersects(rightConverted.getEnvelope());
   29.80  				}
   29.81 -				else if(function instanceof MbbInsideFunc)//within function will do the job!!!
   29.82 +				else if(function instanceof MbbWithinFunc)//within function will do the job!!!
   29.83  				{
   29.84  					int targetSRID = leftGeom.getSRID();
   29.85  					int sourceSRID = rightGeom.getSRID();
    30.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBQueryBuilder.java	Mon Dec 10 18:18:40 2012 +0200
    30.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBQueryBuilder.java	Mon Dec 10 22:27:44 2012 +0200
    30.3 @@ -37,8 +37,7 @@
    30.4  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlConcat;
    30.5  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlContains;
    30.6  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlContainsMBB;
    30.7 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCoveredBy;
    30.8 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCovers;
    30.9 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCrosses;
   30.10  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlDisjoint;
   30.11  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlEq;
   30.12  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlEqualsSpatial;
   30.13 @@ -60,7 +59,6 @@
   30.14  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoSymDifference;
   30.15  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoTransform;
   30.16  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoUnion;
   30.17 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlInside;
   30.18  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlIntersects;
   30.19  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlIsNull;
   30.20  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlLeft;
   30.21 @@ -68,17 +66,18 @@
   30.22  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlLowerCase;
   30.23  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMathExpr;
   30.24  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbEquals;
   30.25 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbInside;
   30.26 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbWithin;
   30.27  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbIntersects;
   30.28  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlNot;
   30.29  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlNull;
   30.30  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOr;
   30.31 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOverlap;
   30.32 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOverlaps;
   30.33  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlRegex;
   30.34  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlRelate;
   30.35  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlRight;
   30.36  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlShift;
   30.37 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlTouch;
   30.38 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlTouches;
   30.39 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlWithin;
   30.40  import org.openrdf.sail.generaldb.algebra.GeneralDBStringValue;
   30.41  import org.openrdf.sail.generaldb.algebra.GeneralDBTrueValue;
   30.42  import org.openrdf.sail.generaldb.algebra.GeneralDBURIColumn;
   30.43 @@ -537,32 +536,29 @@
   30.44  		else if (expr instanceof GeneralDBSqlAnyInteract) {
   30.45  			append((GeneralDBSqlAnyInteract)expr, filter);
   30.46  		}
   30.47 +		else if (expr instanceof GeneralDBSqlCrosses) {
   30.48 +			append((GeneralDBSqlCrosses)expr, filter);
   30.49 +		}
   30.50  		else if (expr instanceof GeneralDBSqlIntersects) {
   30.51  			append((GeneralDBSqlIntersects)expr, filter);
   30.52  		}
   30.53  		else if (expr instanceof GeneralDBSqlContains) {
   30.54  			append((GeneralDBSqlContains)expr, filter);
   30.55  		}
   30.56 -		else if (expr instanceof GeneralDBSqlCovers) {
   30.57 -			append((GeneralDBSqlCovers)expr, filter);
   30.58 -		}
   30.59 -		else if (expr instanceof GeneralDBSqlCoveredBy) {
   30.60 -			append((GeneralDBSqlCoveredBy)expr, filter);
   30.61 -		}
   30.62  		else if (expr instanceof GeneralDBSqlEqualsSpatial) {
   30.63  			append((GeneralDBSqlEqualsSpatial)expr, filter);
   30.64  		}
   30.65 -		else if (expr instanceof GeneralDBSqlInside) {
   30.66 -			append((GeneralDBSqlInside)expr, filter);
   30.67 +		else if (expr instanceof GeneralDBSqlWithin) {
   30.68 +			append((GeneralDBSqlWithin)expr, filter);
   30.69  		}
   30.70 -		else if (expr instanceof GeneralDBSqlTouch) {
   30.71 -			append((GeneralDBSqlTouch)expr, filter);
   30.72 +		else if (expr instanceof GeneralDBSqlTouches) {
   30.73 +			append((GeneralDBSqlTouches)expr, filter);
   30.74  		}
   30.75  		else if (expr instanceof GeneralDBSqlDisjoint) {
   30.76  			append((GeneralDBSqlDisjoint)expr, filter);
   30.77  		}
   30.78 -		else if (expr instanceof GeneralDBSqlOverlap) {
   30.79 -			append((GeneralDBSqlOverlap)expr, filter);
   30.80 +		else if (expr instanceof GeneralDBSqlOverlaps) {
   30.81 +			append((GeneralDBSqlOverlaps)expr, filter);
   30.82  		}
   30.83  		else if (expr instanceof GeneralDBSqlLeft) {
   30.84  			append((GeneralDBSqlLeft)expr, filter);
   30.85 @@ -579,8 +575,8 @@
   30.86  		else if (expr instanceof GeneralDBSqlMbbIntersects) {
   30.87  			append((GeneralDBSqlMbbIntersects)expr, filter);
   30.88  		}
   30.89 -		else if (expr instanceof GeneralDBSqlMbbInside) {
   30.90 -			append((GeneralDBSqlMbbInside)expr, filter);
   30.91 +		else if (expr instanceof GeneralDBSqlMbbWithin) {
   30.92 +			append((GeneralDBSqlMbbWithin)expr, filter);
   30.93  		}
   30.94  		else if (expr instanceof GeneralDBSqlContainsMBB) {
   30.95  			append((GeneralDBSqlContainsMBB)expr, filter);
   30.96 @@ -954,6 +950,9 @@
   30.97  	
   30.98  	protected abstract void append(GeneralDBSqlIntersects expr, GeneralDBSqlExprBuilder filter)
   30.99  			throws UnsupportedRdbmsOperatorException;
  30.100 +	
  30.101 +	protected abstract void append(GeneralDBSqlCrosses expr, GeneralDBSqlExprBuilder filter)
  30.102 +			throws UnsupportedRdbmsOperatorException;
  30.103  
  30.104  	protected abstract void append(GeneralDBSqlContains expr, GeneralDBSqlExprBuilder filter)
  30.105  			throws UnsupportedRdbmsOperatorException;
  30.106 @@ -961,19 +960,13 @@
  30.107  	protected abstract void append(GeneralDBSqlEqualsSpatial expr, GeneralDBSqlExprBuilder filter)
  30.108  			throws UnsupportedRdbmsOperatorException;
  30.109  
  30.110 -	protected abstract void append(GeneralDBSqlInside expr, GeneralDBSqlExprBuilder filter)
  30.111 +	protected abstract void append(GeneralDBSqlWithin expr, GeneralDBSqlExprBuilder filter)
  30.112  			throws UnsupportedRdbmsOperatorException;
  30.113  
  30.114 -	protected abstract void append(GeneralDBSqlCovers expr, GeneralDBSqlExprBuilder filter)
  30.115 +	protected abstract void append(GeneralDBSqlTouches expr, GeneralDBSqlExprBuilder filter)
  30.116  			throws UnsupportedRdbmsOperatorException;
  30.117  
  30.118 -	protected abstract void append(GeneralDBSqlCoveredBy expr, GeneralDBSqlExprBuilder filter)
  30.119 -			throws UnsupportedRdbmsOperatorException;
  30.120 -
  30.121 -	protected abstract void append(GeneralDBSqlTouch expr, GeneralDBSqlExprBuilder filter)
  30.122 -			throws UnsupportedRdbmsOperatorException;
  30.123 -
  30.124 -	protected abstract void append(GeneralDBSqlOverlap expr, GeneralDBSqlExprBuilder filter)
  30.125 +	protected abstract void append(GeneralDBSqlOverlaps expr, GeneralDBSqlExprBuilder filter)
  30.126  			throws UnsupportedRdbmsOperatorException;
  30.127  
  30.128  	protected abstract void append(GeneralDBSqlDisjoint expr, GeneralDBSqlExprBuilder filter)
  30.129 @@ -995,7 +988,7 @@
  30.130  			throws UnsupportedRdbmsOperatorException;
  30.131  	protected abstract void append(GeneralDBSqlMbbIntersects expr, GeneralDBSqlExprBuilder filter)
  30.132  			throws UnsupportedRdbmsOperatorException;
  30.133 -	protected abstract void append(GeneralDBSqlMbbInside expr, GeneralDBSqlExprBuilder filter)
  30.134 +	protected abstract void append(GeneralDBSqlMbbWithin expr, GeneralDBSqlExprBuilder filter)
  30.135  			throws UnsupportedRdbmsOperatorException;
  30.136  	protected abstract void append(GeneralDBSqlContainsMBB expr, GeneralDBSqlExprBuilder filter)
  30.137  			throws UnsupportedRdbmsOperatorException;
  30.138 @@ -1227,5 +1220,4 @@
  30.139  
  30.140  	protected abstract void appendRelate(BinaryGeneralDBOperator expr, GeneralDBSqlExprBuilder filter, char[] intersectionPattern)
  30.141  			throws UnsupportedRdbmsOperatorException;
  30.142 -
  30.143  }
    31.1 --- a/monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBQueryBuilder.java	Mon Dec 10 18:18:40 2012 +0200
    31.2 +++ b/monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBQueryBuilder.java	Mon Dec 10 22:27:44 2012 +0200
    31.3 @@ -21,8 +21,7 @@
    31.4  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCase;
    31.5  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlContains;
    31.6  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlContainsMBB;
    31.7 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCoveredBy;
    31.8 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCovers;
    31.9 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCrosses;
   31.10  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlDisjoint;
   31.11  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlEqualsSpatial;
   31.12  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoArea;
   31.13 @@ -43,18 +42,17 @@
   31.14  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoSymDifference;
   31.15  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoTransform;
   31.16  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoUnion;
   31.17 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlInside;
   31.18  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlIntersects;
   31.19  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlIsNull;
   31.20  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlLeft;
   31.21  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMathExpr;
   31.22  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbEquals;
   31.23 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbInside;
   31.24 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbWithin;
   31.25  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbIntersects;
   31.26  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlNot;
   31.27  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlNull;
   31.28  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOr;
   31.29 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOverlap;
   31.30 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOverlaps;
   31.31  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlRelate;
   31.32  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlRight;
   31.33  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialConstructBinary;
   31.34 @@ -62,7 +60,8 @@
   31.35  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialMetricBinary;
   31.36  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialMetricUnary;
   31.37  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialProperty;
   31.38 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlTouch;
   31.39 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlTouches;
   31.40 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlWithin;
   31.41  import org.openrdf.sail.generaldb.algebra.GeneralDBStringValue;
   31.42  import org.openrdf.sail.generaldb.algebra.GeneralDBURIColumn;
   31.43  import org.openrdf.sail.generaldb.algebra.GeneralDBUnionItem;
   31.44 @@ -123,8 +122,8 @@
   31.45  	{ 	//Spatial Relationships
   31.46  		ST_Disjoint, 
   31.47  		ST_Touches,
   31.48 -		ST_Covers,
   31.49 -		ST_CoveredBy,
   31.50 +		ST_Crosses,
   31.51 +		ST_Within,
   31.52  		ST_Overlaps,
   31.53  		ST_Relate,
   31.54  
   31.55 @@ -414,36 +413,28 @@
   31.56  	}
   31.57  
   31.58  	@Override
   31.59 -	protected void append(GeneralDBSqlInside expr, GeneralDBSqlExprBuilder filter)
   31.60 +	protected void append(GeneralDBSqlWithin expr, GeneralDBSqlExprBuilder filter)
   31.61  			throws UnsupportedRdbmsOperatorException {
   31.62  
   31.63 -		appendMonetDBSpatialFunctionBinary(expr, filter, SpatialFunctionsMonetDB.inside);
   31.64 -		//		appendMonetDBSpatialOperand(expr, filter, SpatialOperandsMonetDB.inside);
   31.65 +		appendMonetDBSpatialFunctionBinary(expr, filter, SpatialFunctionsMonetDB.ST_Within);
   31.66  	}
   31.67  
   31.68  	@Override
   31.69 -	protected void append(GeneralDBSqlCovers expr, GeneralDBSqlExprBuilder filter)
   31.70 +	protected void append(GeneralDBSqlCrosses expr, GeneralDBSqlExprBuilder filter)
   31.71  			throws UnsupportedRdbmsOperatorException {
   31.72  
   31.73 -		appendgeoSPARQLSpatialRelation(expr, filter, SpatialFunctionsMonetDB.ST_Covers);
   31.74 +		appendgeoSPARQLSpatialRelation(expr, filter, SpatialFunctionsMonetDB.ST_Crosses);
   31.75  	}
   31.76  
   31.77  	@Override
   31.78 -	protected void append(GeneralDBSqlCoveredBy expr, GeneralDBSqlExprBuilder filter)
   31.79 -			throws UnsupportedRdbmsOperatorException {
   31.80 -
   31.81 -		appendgeoSPARQLSpatialRelation(expr, filter, SpatialFunctionsMonetDB.ST_CoveredBy);
   31.82 -	}
   31.83 -
   31.84 -	@Override
   31.85 -	protected void append(GeneralDBSqlTouch expr, GeneralDBSqlExprBuilder filter)
   31.86 +	protected void append(GeneralDBSqlTouches expr, GeneralDBSqlExprBuilder filter)
   31.87  			throws UnsupportedRdbmsOperatorException {
   31.88  
   31.89  		appendMonetDBSpatialFunctionBinary(expr, filter, SpatialFunctionsMonetDB.ST_Touches);
   31.90  	}
   31.91  
   31.92  	@Override
   31.93 -	protected void append(GeneralDBSqlOverlap expr, GeneralDBSqlExprBuilder filter)
   31.94 +	protected void append(GeneralDBSqlOverlaps expr, GeneralDBSqlExprBuilder filter)
   31.95  			throws UnsupportedRdbmsOperatorException {
   31.96  
   31.97  		appendMonetDBSpatialFunctionBinary(expr, filter, SpatialFunctionsMonetDB.ST_Overlaps);
   31.98 @@ -1184,9 +1175,9 @@
   31.99  			case ST_Distance: filter.appendFunction("Distance"); break;
  31.100  			case ST_Touches: filter.appendFunction("Touches"); break;
  31.101  			case ST_Disjoint: filter.appendFunction("Disjoint"); break;
  31.102 -			case ST_Covers: filter.appendFunction(""); break; // FIXME (with relate ?)
  31.103 -			case ST_CoveredBy: filter.appendFunction(""); break; // FIXME (with relate ?)
  31.104 +			case ST_Crosses: filter.appendFunction("Crosses"); break;
  31.105  			case ST_Overlaps: filter.appendFunction("Overlaps"); break;
  31.106 +			case ST_Within: filter.appendFunction("Within"); break;
  31.107  			case anyInteract: filter.appendFunction("NOT Disjoint"); break;
  31.108  			case equals: filter.appendFunction("Equals"); break;
  31.109  			case contains: filter.appendFunction("Contains"); break;
  31.110 @@ -1687,89 +1678,37 @@
  31.111  			char[][] intersectionPattern = null;
  31.112  			switch(func)
  31.113  			{
  31.114 -			case ST_Covers: 
  31.115 -				intersectionPattern = new char[4][9];
  31.116 +			case ST_Crosses: 
  31.117 +				intersectionPattern = new char[3][9];
  31.118  				intersectionPattern[0][0] = 'T';
  31.119  				intersectionPattern[0][1] = '*';
  31.120 -				intersectionPattern[0][2] = '*';
  31.121 +				intersectionPattern[0][2] = 'T';
  31.122  				intersectionPattern[0][3] = '*';
  31.123  				intersectionPattern[0][4] = '*';
  31.124  				intersectionPattern[0][5] = '*';
  31.125 -				intersectionPattern[0][6] = 'F';
  31.126 -				intersectionPattern[0][7] = 'F';
  31.127 +				intersectionPattern[0][6] = '*';
  31.128 +				intersectionPattern[0][7] = '*';
  31.129  				intersectionPattern[0][8] = '*';
  31.130  				//
  31.131 -				intersectionPattern[1][0] = '*';
  31.132 -				intersectionPattern[1][1] = 'T';
  31.133 +				intersectionPattern[1][0] = 'T';
  31.134 +				intersectionPattern[1][1] = '*';
  31.135  				intersectionPattern[1][2] = '*';
  31.136  				intersectionPattern[1][3] = '*';
  31.137  				intersectionPattern[1][4] = '*';
  31.138  				intersectionPattern[1][5] = '*';
  31.139 -				intersectionPattern[1][6] = 'F';
  31.140 -				intersectionPattern[1][7] = 'F';
  31.141 -				intersectionPattern[1][8] = '*';
  31.142 -				//
  31.143 -				intersectionPattern[2][0] = '*';
  31.144 -				intersectionPattern[2][1] = '*';
  31.145 -				intersectionPattern[2][2] = '*';
  31.146 -				intersectionPattern[2][3] = 'T';
  31.147 -				intersectionPattern[2][4] = '*';
  31.148 -				intersectionPattern[2][5] = '*';
  31.149 -				intersectionPattern[2][6] = 'F';
  31.150 -				intersectionPattern[2][7] = 'F';
  31.151 -				intersectionPattern[2][8] = '*';
  31.152 -				//
  31.153 -				intersectionPattern[3][0] = '*';
  31.154 -				intersectionPattern[3][1] = '*';
  31.155 -				intersectionPattern[3][2] = '*';
  31.156 -				intersectionPattern[3][3] = '*';
  31.157 -				intersectionPattern[3][4] = 'T';
  31.158 -				intersectionPattern[3][5] = '*';
  31.159 -				intersectionPattern[3][6] = 'F';
  31.160 -				intersectionPattern[3][7] = 'F';
  31.161 -				intersectionPattern[3][8] = '*';
  31.162 -				break;
  31.163 -			case ST_CoveredBy: 
  31.164 -				intersectionPattern = new char[4][9];
  31.165 -				intersectionPattern[0][0] = 'T';
  31.166 -				intersectionPattern[0][1] = '*';
  31.167 -				intersectionPattern[0][2] = 'F';
  31.168 -				intersectionPattern[0][3] = '*';
  31.169 -				intersectionPattern[0][4] = '*';
  31.170 -				intersectionPattern[0][5] = 'F';
  31.171 -				intersectionPattern[0][6] = '*';
  31.172 -				intersectionPattern[0][7] = '*';
  31.173 -				intersectionPattern[0][8] = '*';
  31.174 -				//
  31.175 -				intersectionPattern[1][0] = '*';
  31.176 -				intersectionPattern[1][1] = 'T';
  31.177 -				intersectionPattern[1][2] = 'F';
  31.178 -				intersectionPattern[1][3] = '*';
  31.179 -				intersectionPattern[1][4] = '*';
  31.180 -				intersectionPattern[1][5] = 'F';
  31.181 -				intersectionPattern[1][6] = '*';
  31.182 +				intersectionPattern[1][6] = 'T';
  31.183  				intersectionPattern[1][7] = '*';
  31.184  				intersectionPattern[1][8] = '*';
  31.185  				//
  31.186 -				intersectionPattern[2][0] = '*';
  31.187 +				intersectionPattern[2][0] = '0';
  31.188  				intersectionPattern[2][1] = '*';
  31.189 -				intersectionPattern[2][2] = 'F';
  31.190 -				intersectionPattern[2][3] = 'T';
  31.191 +				intersectionPattern[2][2] = '*';
  31.192 +				intersectionPattern[2][3] = '*';
  31.193  				intersectionPattern[2][4] = '*';
  31.194 -				intersectionPattern[2][5] = 'F';
  31.195 +				intersectionPattern[2][5] = '*';
  31.196  				intersectionPattern[2][6] = '*';
  31.197  				intersectionPattern[2][7] = '*';
  31.198  				intersectionPattern[2][8] = '*';
  31.199 -				//
  31.200 -				intersectionPattern[3][0] = '*';
  31.201 -				intersectionPattern[3][1] = '*';
  31.202 -				intersectionPattern[3][2] = 'F';
  31.203 -				intersectionPattern[3][3] = '*';
  31.204 -				intersectionPattern[3][4] = 'T';
  31.205 -				intersectionPattern[3][5] = 'F';
  31.206 -				intersectionPattern[3][6] = '*';
  31.207 -				intersectionPattern[3][7] = '*';
  31.208 -				intersectionPattern[3][8] = '*';
  31.209  				break;
  31.210  			case SF_Contains:  
  31.211  				intersectionPattern = new char[1][9];
  31.212 @@ -2084,7 +2023,7 @@
  31.213  	}
  31.214  
  31.215  	@Override
  31.216 -	protected void append(GeneralDBSqlMbbInside expr,
  31.217 +	protected void append(GeneralDBSqlMbbWithin expr,
  31.218  			GeneralDBSqlExprBuilder filter)
  31.219  			throws UnsupportedRdbmsOperatorException {
  31.220  		// TODO Auto-generated method stub
    32.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Mon Dec 10 18:18:40 2012 +0200
    32.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Mon Dec 10 22:27:44 2012 +0200
    32.3 @@ -20,8 +20,7 @@
    32.4  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCase;
    32.5  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlContains;
    32.6  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlContainsMBB;
    32.7 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCoveredBy;
    32.8 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCovers;
    32.9 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlCrosses;
   32.10  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlDisjoint;
   32.11  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlEqualsSpatial;
   32.12  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoArea;
   32.13 @@ -42,17 +41,16 @@
   32.14  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoSymDifference;
   32.15  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoTransform;
   32.16  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoUnion;
   32.17 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlInside;
   32.18  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlIntersects;
   32.19  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlIsNull;
   32.20  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlLeft;
   32.21  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMathExpr;
   32.22  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbEquals;
   32.23 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbInside;
   32.24 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbWithin;
   32.25  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlMbbIntersects;
   32.26  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlNot;
   32.27  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlNull;
   32.28 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOverlap;
   32.29 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOverlaps;
   32.30  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlRelate;
   32.31  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlRight;
   32.32  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialConstructBinary;
   32.33 @@ -60,7 +58,8 @@
   32.34  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialMetricBinary;
   32.35  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialMetricUnary;
   32.36  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialProperty;
   32.37 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlTouch;
   32.38 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlTouches;
   32.39 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlWithin;
   32.40  import org.openrdf.sail.generaldb.algebra.GeneralDBStringValue;
   32.41  import org.openrdf.sail.generaldb.algebra.GeneralDBURIColumn;
   32.42  import org.openrdf.sail.generaldb.algebra.GeneralDBUnionItem;
   32.43 @@ -119,21 +118,21 @@
   32.44  	 */
   32.45  	boolean nullLabel = false;
   32.46  
   32.47 -	public enum SpatialOperandsPostGIS { anyInteract, equals, contains, left, right, above, inside, below; }
   32.48 +	public enum SpatialOperandsPostGIS { anyInteract, equals, contains, inside, left, right, above, below; }
   32.49  	public enum SpatialFunctionsPostGIS 
   32.50  	{ 	//stSPARQL++
   32.51  		//Spatial Relationships
   32.52 -		ST_Disjoint, 
   32.53 +		ST_Equals,
   32.54 +		ST_Disjoint,
   32.55 +		ST_Intersects,
   32.56  		ST_Touches, 
   32.57 -		ST_Covers,
   32.58 -		ST_CoveredBy, 
   32.59 -		ST_Overlaps,
   32.60 -		ST_Intersects,
   32.61 -		ST_Equals,
   32.62 -		ST_Relate, 
   32.63 +		ST_Crosses,
   32.64  		ST_Within,
   32.65  		ST_Contains,
   32.66 -		
   32.67 +		ST_Overlaps,
   32.68 +		ST_Relate,
   32.69 +		//ST_Covers,
   32.70 +		//ST_CoveredBy,
   32.71  		
   32.72  		//Spatial Constructs - Binary
   32.73  		ST_Union, 
   32.74 @@ -352,27 +351,10 @@
   32.75  	//Spatial Relationship Functions
   32.76  	@Override
   32.77  	protected void append(GeneralDBSqlAnyInteract expr, GeneralDBSqlExprBuilder filter)
   32.78 -			throws UnsupportedRdbmsOperatorException
   32.79 -			{
   32.80 -		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Intersects);
   32.81 -			}
   32.82 -
   32.83 -
   32.84 -	@Override
   32.85 -	protected void append(GeneralDBSqlIntersects expr, 	GeneralDBSqlExprBuilder filter)
   32.86  			throws UnsupportedRdbmsOperatorException {
   32.87 +		//dummy
   32.88  		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Intersects);
   32.89  	}
   32.90 -
   32.91 -	@Override
   32.92 -	protected void append(GeneralDBSqlContains expr, GeneralDBSqlExprBuilder filter)
   32.93 -			throws UnsupportedRdbmsOperatorException {
   32.94 -
   32.95 -		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Contains);
   32.96 -	}
   32.97 -
   32.98 -
   32.99 -
  32.100  	
  32.101  	@Override
  32.102  	protected void append(GeneralDBSqlEqualsSpatial expr, GeneralDBSqlExprBuilder filter)
  32.103 @@ -380,58 +362,81 @@
  32.104  
  32.105  		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Equals);
  32.106  	}
  32.107 -
  32.108 -	@Override
  32.109 -	protected void append(GeneralDBSqlInside expr, GeneralDBSqlExprBuilder filter)
  32.110 -			throws UnsupportedRdbmsOperatorException {
  32.111 -
  32.112 -		//appendStSPARQLSpatialOperand(expr, filter, SpatialOperandsPostGIS.inside);
  32.113 -		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Within);
  32.114 -
  32.115 -	}
  32.116 -
  32.117 -	@Override
  32.118 -	protected void append(GeneralDBSqlCovers expr, GeneralDBSqlExprBuilder filter)
  32.119 -			throws UnsupportedRdbmsOperatorException {
  32.120 -
  32.121 -		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Covers);
  32.122 -	}
  32.123 -
  32.124 -	@Override
  32.125 -	protected void append(GeneralDBSqlCoveredBy expr, GeneralDBSqlExprBuilder filter)
  32.126 -			throws UnsupportedRdbmsOperatorException {
  32.127 -
  32.128 -		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_CoveredBy);
  32.129 -	}
  32.130 -
  32.131 -	@Override
  32.132 -	protected void append(GeneralDBSqlTouch expr, GeneralDBSqlExprBuilder filter)
  32.133 -			throws UnsupportedRdbmsOperatorException {
  32.134 -
  32.135 -		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Touches);
  32.136 -	}
  32.137 -
  32.138 -	@Override
  32.139 -	protected void append(GeneralDBSqlOverlap expr, GeneralDBSqlExprBuilder filter)
  32.140 -			throws UnsupportedRdbmsOperatorException {
  32.141 -
  32.142 -		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Overlaps);
  32.143 -	}
  32.144 -
  32.145 +	
  32.146  	@Override
  32.147  	protected void append(GeneralDBSqlDisjoint expr, GeneralDBSqlExprBuilder filter)
  32.148  			throws UnsupportedRdbmsOperatorException {
  32.149  
  32.150  		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Disjoint);
  32.151  	}
  32.152 +	
  32.153 +	@Override
  32.154 +	protected void append(GeneralDBSqlIntersects expr, 	GeneralDBSqlExprBuilder filter)
  32.155 +			throws UnsupportedRdbmsOperatorException {
  32.156 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Intersects);
  32.157 +	}
  32.158 +	
  32.159 +	@Override
  32.160 +	protected void append(GeneralDBSqlTouches expr, GeneralDBSqlExprBuilder filter)
  32.161 +			throws UnsupportedRdbmsOperatorException {
  32.162  
  32.163 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Touches);
  32.164 +	}
  32.165 +	
  32.166 +	@Override
  32.167 +	protected void append(GeneralDBSqlCrosses expr, GeneralDBSqlExprBuilder filter)
  32.168 +			throws UnsupportedRdbmsOperatorException {
  32.169 +
  32.170 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Crosses);
  32.171 +	}	
  32.172 +	
  32.173 +	@Override
  32.174 +	protected void append(GeneralDBSqlWithin expr, GeneralDBSqlExprBuilder filter)
  32.175 +			throws UnsupportedRdbmsOperatorException {
  32.176 +
  32.177 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Within);
  32.178 +
  32.179 +	}
  32.180 +	
  32.181 +	@Override
  32.182 +	protected void append(GeneralDBSqlContains expr, GeneralDBSqlExprBuilder filter)
  32.183 +			throws UnsupportedRdbmsOperatorException {
  32.184 +
  32.185 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Contains);
  32.186 +	}
  32.187 +	
  32.188 +	@Override
  32.189 +	protected void append(GeneralDBSqlOverlaps expr, GeneralDBSqlExprBuilder filter)
  32.190 +			throws UnsupportedRdbmsOperatorException {
  32.191 +
  32.192 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Overlaps);
  32.193 +	}
  32.194 +	
  32.195  	@Override
  32.196  	protected void append(GeneralDBSqlRelate expr, GeneralDBSqlExprBuilder filter)
  32.197 -			throws UnsupportedRdbmsOperatorException
  32.198 -			{
  32.199 +			throws UnsupportedRdbmsOperatorException {
  32.200  		appendGeneralDBSpatialFunctionTriple(expr, filter, SpatialFunctionsPostGIS.ST_Relate);
  32.201 -			}
  32.202 +	}
  32.203  
  32.204 +//	@Override
  32.205 +//	protected void append(GeneralDBSqlCovers expr, GeneralDBSqlExprBuilder filter)
  32.206 +//			throws UnsupportedRdbmsOperatorException {
  32.207 +//
  32.208 +//		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Covers);
  32.209 +//	}
  32.210 +//
  32.211 +//	@Override
  32.212 +//	protected void append(GeneralDBSqlCoveredBy expr, GeneralDBSqlExprBuilder filter)
  32.213 +//			throws UnsupportedRdbmsOperatorException {
  32.214 +//
  32.215 +//		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_CoveredBy);
  32.216 +//	}
  32.217 +
  32.218 +	
  32.219 +
  32.220 +	
  32.221 +
  32.222 +	
  32.223  	@Override	
  32.224  	protected void append(GeneralDBSqlLeft expr, GeneralDBSqlExprBuilder filter)
  32.225  			throws UnsupportedRdbmsOperatorException
  32.226 @@ -467,7 +472,7 @@
  32.227  	}
  32.228  
  32.229  	@Override
  32.230 -	protected void append(GeneralDBSqlMbbInside expr, GeneralDBSqlExprBuilder filter)
  32.231 +	protected void append(GeneralDBSqlMbbWithin expr, GeneralDBSqlExprBuilder filter)
  32.232  			throws UnsupportedRdbmsOperatorException {
  32.233  		appendStSPARQLSpatialOperand(expr, filter, SpatialOperandsPostGIS.inside);
  32.234  	}
  32.235 @@ -1340,15 +1345,15 @@
  32.236  			case ST_SymDifference: filter.appendFunction("ST_SymDifference"); break;
  32.237  			case ST_Buffer: filter.appendFunction("ST_Buffer"); break;
  32.238  			case ST_Distance: filter.appendFunction("ST_Distance"); break;
  32.239 +			
  32.240 +			case ST_Equals: filter.appendFunction("ST_Equals"); break;
  32.241 +			case ST_Disjoint: filter.appendFunction("ST_Disjoint"); break;
  32.242 +			case ST_Intersects: filter.appendFunction("ST_Intersects"); break;
  32.243  			case ST_Touches: filter.appendFunction("ST_Touches"); break;
  32.244 -			case ST_Disjoint: filter.appendFunction("ST_Disjoint"); break;
  32.245 -			case ST_Covers: filter.appendFunction("ST_Covers"); break;
  32.246 +			case ST_Crosses: filter.appendFunction("ST_Crosses"); break;
  32.247 +			case ST_Within: filter.appendFunction("ST_Within"); break;
  32.248  			case ST_Contains: filter.appendFunction("ST_Contains"); break;
  32.249 -			case ST_CoveredBy: filter.appendFunction("ST_CoveredBy"); break;
  32.250  			case ST_Overlaps: filter.appendFunction("ST_Overlaps"); break;
  32.251 -			case ST_Intersects: filter.appendFunction("ST_Intersects"); break;
  32.252 -			case ST_Equals: filter.appendFunction("ST_Equals"); break;
  32.253 -			case ST_Within: filter.appendFunction("ST_Within"); break;
  32.254  			
  32.255  			}
  32.256  			
  32.257 @@ -1863,30 +1868,6 @@
  32.258  			char[][] intersectionPattern = null;
  32.259  			switch(func)
  32.260  			{
  32.261 -			case ST_Covers: 
  32.262 -				intersectionPattern = new char[1][9];
  32.263 -				intersectionPattern[0][0] = 'T';
  32.264 -				intersectionPattern[0][1] = '*';
  32.265 -				intersectionPattern[0][2] = 'T';
  32.266 -				intersectionPattern[0][3] = 'F';
  32.267 -				intersectionPattern[0][4] = 'T';
  32.268 -				intersectionPattern[0][5] = '*';
  32.269 -				intersectionPattern[0][6] = 'F';
  32.270 -				intersectionPattern[0][7] = 'F';
  32.271 -				intersectionPattern[0][8] = '*';
  32.272 -				break;
  32.273 -			case ST_CoveredBy: 
  32.274 -				intersectionPattern = new char[1][9];
  32.275 -				intersectionPattern[0][0] = 'T';
  32.276 -				intersectionPattern[0][1] = 'F';
  32.277 -				intersectionPattern[0][2] = 'F';
  32.278 -				intersectionPattern[0][3] = '*';
  32.279 -				intersectionPattern[0][4] = 'T';
  32.280 -				intersectionPattern[0][5] = 'F';
  32.281 -				intersectionPattern[0][6] = 'T';
  32.282 -				intersectionPattern[0][7] = '*';
  32.283 -				intersectionPattern[0][8] = '*';
  32.284 -				break;
  32.285  			case SF_Contains:  
  32.286  				intersectionPattern = new char[1][9];
  32.287  				intersectionPattern[0][0] = 'T';
  32.288 @@ -1899,8 +1880,14 @@
  32.289  				intersectionPattern[0][7] = 'F';
  32.290  				intersectionPattern[0][8] = '*';
  32.291  				break;
  32.292 -			case SF_Crosses:  
  32.293 -				intersectionPattern = new char[1][9];
  32.294 +			case SF_Crosses:
  32.295 +				// FIXME BUG
  32.296 +				// TODO a crosses b, they have some but not all interior points in common 
  32.297 +				// (and the dimension of the intersection is less than that of at least one 
  32.298 +				// of them). Mask selection rules are checked only when dim(a)≠dim(b), 
  32.299 +				// except by point/point inputs, otherwise is false.
  32.300 +				// (II=0) for points,   (II ∧ IE) when dim(a)<dim(b),   (II ∧ EI) when dim(a)>dim(b)
  32.301 +				intersectionPattern = new char[3][9];
  32.302  				intersectionPattern[0][0] = 'T';
  32.303  				intersectionPattern[0][1] = '*';
  32.304  				intersectionPattern[0][2] = 'T';
  32.305 @@ -1910,6 +1897,26 @@
  32.306  				intersectionPattern[0][6] = '*';
  32.307  				intersectionPattern[0][7] = '*';
  32.308  				intersectionPattern[0][8] = '*';
  32.309 +				//
  32.310 +				intersectionPattern[1][0] = 'T';
  32.311 +				intersectionPattern[1][1] = '*';
  32.312 +				intersectionPattern[1][2] = '*';
  32.313 +				intersectionPattern[1][3] = '*';
  32.314 +				intersectionPattern[1][4] = '*';
  32.315 +				intersectionPattern[1][5] = '*';
  32.316 +				intersectionPattern[1][6] = 'T';
  32.317 +				intersectionPattern[1][7] = '*';
  32.318 +				intersectionPattern[1][8] = '*';
  32.319 +				//
  32.320 +				intersectionPattern[2][0] = '0';
  32.321 +				intersectionPattern[2][1] = '*';
  32.322 +				intersectionPattern[2][2] = '*';
  32.323 +				intersectionPattern[2][3] = '*';
  32.324 +				intersectionPattern[2][4] = '*';
  32.325 +				intersectionPattern[2][5] = '*';
  32.326 +				intersectionPattern[2][6] = '*';
  32.327 +				intersectionPattern[2][7] = '*';
  32.328 +				intersectionPattern[2][8] = '*';
  32.329  				break;
  32.330  			case SF_Disjoint:
  32.331  			case EH_Disjoint:
  32.332 @@ -1940,7 +1947,14 @@
  32.333  				break;
  32.334  			case SF_Overlaps:
  32.335  			case EH_Overlap:
  32.336 -				intersectionPattern = new char[1][9];
  32.337 +				// FIXME BUG
  32.338 +				// TODO a overlaps b, they have some but not all points in common, 
  32.339 +				// they have the same dimension, and the intersection of the 
  32.340 +				// interiors of the two geometries has the same dimension as the 
  32.341 +				// geometries themselves. Mask selection rules are checked 
  32.342 +				// only when dim(a)=dim(b), otherwise is false:
  32.343 +				// (II ∧ IE ∧ EI) for points or surfaces,   (II=1 ∧ IE ∧ EI) for lines
  32.344 +				intersectionPattern = new char[2][9];
  32.345  				intersectionPattern[0][0] = 'T';
  32.346  				intersectionPattern[0][1] = '*';
  32.347  				intersectionPattern[0][2] = 'T';
  32.348 @@ -1950,6 +1964,15 @@
  32.349  				intersectionPattern[0][6] = 'T';
  32.350  				intersectionPattern[0][7] = '*';
  32.351  				intersectionPattern[0][8] = '*';
  32.352 +				intersectionPattern[1][0] = '1';
  32.353 +				intersectionPattern[1][1] = '*';
  32.354 +				intersectionPattern[1][2] = 'T';
  32.355 +				intersectionPattern[1][3] = '*';
  32.356 +				intersectionPattern[1][4] = '*';
  32.357 +				intersectionPattern[1][5] = '*';
  32.358 +				intersectionPattern[1][6] = 'T';
  32.359 +				intersectionPattern[1][7] = '*';
  32.360 +				intersectionPattern[1][8] = '*';
  32.361  				break;
  32.362  			case SF_Within: 
  32.363  				intersectionPattern = new char[1][9];
    33.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/SpatialTests.java	Mon Dec 10 18:18:40 2012 +0200
    33.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/SpatialTests.java	Mon Dec 10 22:27:44 2012 +0200
    33.3 @@ -25,26 +25,11 @@
    33.4  
    33.5  public class SpatialTests {
    33.6  	public static Strabon strabon;
    33.7 -	
    33.8 -	protected static String jdbcDriver= "org.postgresql.Driver";  
    33.9 -	protected static String serverName = "localhost";
   33.10 -	protected static String username = "postgres";
   33.11 -	protected static String password = "postgres";
   33.12 -	protected static Integer port = 5432;
   33.13 -	protected static java.sql.Connection conn = null;
   33.14 -	protected static String databaseName = null; 
   33.15  
   33.16  	public String 	STRDF_NS = "http://strdf.di.uoa.gr/ontology#",
   33.17  					EX_NS = "http://example.org/",
   33.18  					NOA_NS = "http://teleios.di.uoa.gr/ontologies/noaOntology.owl#",
   33.19  					GEOF_NS ="http://www.opengis.net/def/queryLanguage/OGC-GeoSPARQL/1.0/function/";
   33.20 -	
   33.21 -//	@BeforeClass
   33.22 -//	public static void initialize() throws SQLException, ClassNotFoundException
   33.23 -//	{
   33.24 -//		strabon = new Strabon("spatial-tests","postgres","postgres", 5432, "localhost", true);
   33.25 -//	}
   33.26 -
   33.27  
   33.28  	protected String prefixes = 
   33.29  		"PREFIX rdf: <"+RDF.NAMESPACE+"> \n" +
   33.30 @@ -57,7 +42,46 @@
   33.31  	// -- Spatial Relationships -- //
   33.32  	
   33.33  	@Test
   33.34 -	public void testStrdfAnyInteract() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
   33.35 +	public void testStrdfEquals() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
   33.36 +	{
   33.37 +		String query = 
   33.38 +			prefixes+
   33.39 +			"SELECT DISTINCT ?s1 ?s2 \n"+
   33.40 +			"WHERE { \n" +
   33.41 +			" ?s1 ex:geometry ?g1 . \n"+
   33.42 +			" ?s2 ex:geometry ?g2 . \n" +
   33.43 +			" FILTER( str(?s1) < str(?s2) ) . \n"+
   33.44 +			" FILTER( strdf:equals(?g1, ?g2 )) . \n"+
   33.45 +			"}";
   33.46 +		
   33.47 +		@SuppressWarnings("unchecked")
   33.48 +		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
   33.49 +		assertEquals(1, bindings.size());
   33.50 +		assertTrue(-1<bindings.indexOf("[s2=http://example.org/pol11;s1=http://example.org/pol1]"));
   33.51 +	}
   33.52 +	
   33.53 +	@Test
   33.54 +	public void testStrdfDisjoint() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
   33.55 +	{
   33.56 +		String query = 
   33.57 +			prefixes+
   33.58 +			"SELECT DISTINCT ?s1 ?s2 \n"+
   33.59 +			"WHERE { \n" +
   33.60 +			" ?s1 ex:geometry ?g1 . \n"+
   33.61 +			" ?s2 ex:geometry ?g2 . \n" +
   33.62 +			" FILTER( str(?s1) < str(?s2) ) . \n"+
   33.63 +			" FILTER( strdf:disjoint(?g1, ?g2 )) . \n"+
   33.64 +			"}";
   33.65 +
   33.66 +		@SuppressWarnings("unchecked")
   33.67 +		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
   33.68 +		assertEquals(60, bindings.size());
   33.69 +		// too many results
   33.70 +		//assertTrue(-1<bindings.indexOf("[s2=http://example.org/pol11;s1=http://example.org/pol1]"));
   33.71 +	}
   33.72 +
   33.73 +	@Test
   33.74 +	public void testStrdfIntesects() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
   33.75  	{
   33.76  		String query = 
   33.77  			prefixes+
   33.78 @@ -68,17 +92,82 @@
   33.79  			" FILTER( str(?id1) < str(?id2) ) . \n"+
   33.80  			" ?s2 ex:geometry ?g2 . \n" +
   33.81  			" ?s1 ex:geometry ?g1 . \n"+
   33.82 -			" FILTER( strdf:anyInteract(?g1, ?g2 ) ) . \n"+
   33.83 +			" FILTER( strdf:intersects(?g1, ?g2 )) . \n"+
   33.84  			"}";
   33.85  		
   33.86 -		@SuppressWarnings("unchecked")	
   33.87 +		@SuppressWarnings("unchecked")
   33.88  		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
   33.89 -
   33.90 -		assertEquals(4, bindings.size());
   33.91 +		assertEquals(5, bindings.size());
   33.92  		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"B\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
   33.93  		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"E\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
   33.94  		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"F\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
   33.95  		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"G\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
   33.96 +		assertTrue(-1<bindings.indexOf("[id2=\"L2\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"L1\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
   33.97 +	}
   33.98 +	
   33.99 +	@Test
  33.100 +	public void testStrdfTouches() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.101 +	{
  33.102 +		String query = 
  33.103 +			prefixes+
  33.104 +			"SELECT DISTINCT ?id1 ?id2 \n"+
  33.105 +			"WHERE { \n" +
  33.106 +			" ?s1 ex:id ?id1 . \n"+
  33.107 +			" ?s2 ex:id ?id2 . \n"+
  33.108 +			" FILTER( str(?id1) < str(?id2) ) . \n"+
  33.109 +			" ?s2 ex:geometry ?g2 . \n" +
  33.110 +			" ?s1 ex:geometry ?g1 . \n"+
  33.111 +			" FILTER( strdf:touches(?g1, ?g2 )) . \n"+
  33.112 +			"}";
  33.113 +		
  33.114 +		@SuppressWarnings("unchecked")
  33.115 +		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.116 +		assertEquals(1, bindings.size());
  33.117 +		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"G\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.118 +	}	
  33.119 +	
  33.120 +	@Test
  33.121 +	public void testStrdfCrosses() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.122 +	{
  33.123 +		String query = 
  33.124 +			prefixes+
  33.125 +			"SELECT DISTINCT ?id1 ?id2 \n"+
  33.126 +			"WHERE { \n" +
  33.127 +			" ?s1 ex:id ?id1 . \n"+
  33.128 +			" ?s2 ex:id ?id2 . \n"+
  33.129 +			" FILTER( str(?id1) != str(?id2) ) . \n"+
  33.130 +			" ?s2 ex:geometry ?g2 . \n" +
  33.131 +			" ?s1 ex:geometry ?g1 . \n"+
  33.132 +			" FILTER( strdf:crosses(?g1, ?g2 )) . \n"+
  33.133 +			"}";
  33.134 +		
  33.135 +		@SuppressWarnings("unchecked")
  33.136 +		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.137 +		assertEquals(2, bindings.size());
  33.138 +		assertTrue(-1<bindings.indexOf("[id2=\"L1\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"L2\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.139 +		assertTrue(-1<bindings.indexOf("[id2=\"L2\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"L1\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.140 +	}
  33.141 +	
  33.142 +	@Test
  33.143 +	public void testStrdfWithin() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.144 +	{
  33.145 +		String query = 
  33.146 +			prefixes+
  33.147 +			"SELECT DISTINCT ?id1 ?id2 \n"+
  33.148 +			"WHERE { \n" +
  33.149 +			" ?s1 ex:id ?id1 . \n"+
  33.150 +			" ?s2 ex:id ?id2 . \n"+
  33.151 +			" FILTER( str(?id1) != str(?id2) ) . \n"+
  33.152 +			" ?s2 ex:geometry ?g2 . \n" +
  33.153 +			" ?s1 ex:geometry ?g1 . \n"+
  33.154 +			" FILTER( strdf:within(?g1, ?g2)) . \n"+
  33.155 +			"}";
  33.156 +		
  33.157 +		@SuppressWarnings("unchecked")
  33.158 +		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.159 +		assertEquals(2, bindings.size());
  33.160 +		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"E\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.161 +		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"F\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.162  	}
  33.163  	
  33.164  	@Test
  33.165 @@ -104,7 +193,7 @@
  33.166  	}
  33.167  	
  33.168  	@Test
  33.169 -	public void testStrdfCovers() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.170 +	public void testStrdfOverlaps() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.171  	{
  33.172  		String query = 
  33.173  			prefixes+
  33.174 @@ -115,112 +204,7 @@
  33.175  			" FILTER( str(?id1) != str(?id2) ) . \n"+
  33.176  			" ?s2 ex:geometry ?g2 . \n" +
  33.177  			" ?s1 ex:geometry ?g1 . \n"+
  33.178 -			" FILTER( strdf:covers(?g1, ?g2 )) . \n"+
  33.179 -			"}";
  33.180 -		
  33.181 -		@SuppressWarnings("unchecked")
  33.182 -		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.183 -		assertEquals(2, bindings.size());
  33.184 -		assertTrue(-1<bindings.indexOf("[id2=\"F\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.185 -		assertTrue(-1<bindings.indexOf("[id2=\"E\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.186 -	}
  33.187 -	
  33.188 -	@Test
  33.189 -	public void testStrdfCoveredBy() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.190 -	{
  33.191 -		String query = 
  33.192 -			prefixes+
  33.193 -			"SELECT DISTINCT ?id1 ?id2 \n"+
  33.194 -			"WHERE { \n" +
  33.195 -			" ?s1 ex:id ?id1 . \n"+
  33.196 -			" ?s2 ex:id ?id2 . \n"+
  33.197 -			" FILTER( str(?id1) != str(?id2) ) . \n"+
  33.198 -			" ?s2 ex:geometry ?g2 . \n" +
  33.199 -			" ?s1 ex:geometry ?g1 . \n"+
  33.200 -			" FILTER( strdf:coveredBy(?g1, ?g2 )) . \n"+
  33.201 -			"}";
  33.202 -
  33.203 -		@SuppressWarnings("unchecked")
  33.204 -		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.205 -		assertEquals(2, bindings.size());
  33.206 -		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"F\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.207 -		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"E\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.208 -	}
  33.209 -
  33.210 -	@Test
  33.211 -	public void testStrdfDisjoint() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.212 -	{
  33.213 -		String query = 
  33.214 -			prefixes+
  33.215 -			"SELECT DISTINCT ?s1 ?s2 \n"+
  33.216 -			"WHERE { \n" +
  33.217 -			" ?s1 ex:geometry ?g1 . \n"+
  33.218 -			" ?s2 ex:geometry ?g2 . \n" +
  33.219 -			" FILTER( str(?s1) < str(?s2) ) . \n"+
  33.220 -			" FILTER( strdf:disjoint(?g1, ?g2 )) . \n"+
  33.221 -			"}";
  33.222 -
  33.223 -		@SuppressWarnings("unchecked")
  33.224 -		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.225 -		assertEquals(40, bindings.size());
  33.226 -		// too many results
  33.227 -		//assertTrue(-1<bindings.indexOf("[s2=http://example.org/pol11;s1=http://example.org/pol1]"));
  33.228 -	}
  33.229 -
  33.230 -	@Test
  33.231 -	public void testStrdfEquals() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.232 -	{
  33.233 -		String query = 
  33.234 -			prefixes+
  33.235 -			"SELECT DISTINCT ?s1 ?s2 \n"+
  33.236 -			"WHERE { \n" +
  33.237 -			" ?s1 ex:geometry ?g1 . \n"+
  33.238 -			" ?s2 ex:geometry ?g2 . \n" +
  33.239 -			" FILTER( str(?s1) < str(?s2) ) . \n"+
  33.240 -			" FILTER( strdf:equals(?g1, ?g2 )) . \n"+
  33.241 -			"}";
  33.242 -		
  33.243 -		@SuppressWarnings("unchecked")
  33.244 -		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.245 -		assertEquals(1, bindings.size());
  33.246 -		assertTrue(-1<bindings.indexOf("[s2=http://example.org/pol11;s1=http://example.org/pol1]"));
  33.247 -		}
  33.248 -
  33.249 -	@Test
  33.250 -	public void testStrdfWithin() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.251 -	{
  33.252 -		String query = 
  33.253 -			prefixes+
  33.254 -			"SELECT DISTINCT ?id1 ?id2 \n"+
  33.255 -			"WHERE { \n" +
  33.256 -			" ?s1 ex:id ?id1 . \n"+
  33.257 -			" ?s2 ex:id ?id2 . \n"+
  33.258 -			" FILTER( str(?id1) != str(?id2) ) . \n"+
  33.259 -			" ?s2 ex:geometry ?g2 . \n" +
  33.260 -			" ?s1 ex:geometry ?g1 . \n"+
  33.261 -			" FILTER( strdf:within(?g1, ?g2)) . \n"+
  33.262 -			"}";
  33.263 -		
  33.264 -		@SuppressWarnings("unchecked")
  33.265 -		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.266 -		assertEquals(2, bindings.size());
  33.267 -		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"E\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.268 -		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"F\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.269 -	}
  33.270 -
  33.271 -	@Test
  33.272 -	public void testStrdfOverlap() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.273 -	{
  33.274 -		String query = 
  33.275 -			prefixes+
  33.276 -			"SELECT DISTINCT ?id1 ?id2 \n"+
  33.277 -			"WHERE { \n" +
  33.278 -			" ?s1 ex:id ?id1 . \n"+
  33.279 -			" ?s2 ex:id ?id2 . \n"+
  33.280 -			" FILTER( str(?id1) != str(?id2) ) . \n"+
  33.281 -			" ?s2 ex:geometry ?g2 . \n" +
  33.282 -			" ?s1 ex:geometry ?g1 . \n"+
  33.283 -			" FILTER( strdf:overlap(?g1, ?g2 )) . \n"+
  33.284 +			" FILTER( strdf:overlaps(?g1, ?g2 )) . \n"+
  33.285  			"}";
  33.286  		
  33.287  		@SuppressWarnings("unchecked")
  33.288 @@ -229,9 +213,9 @@
  33.289  		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"B\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.290  		assertTrue(-1<bindings.indexOf("[id2=\"B\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.291  	}
  33.292 -
  33.293 +	
  33.294  	@Test
  33.295 -	public void testStrdfTouch() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.296 +	public void testStrdfAnyInteract() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.297  	{
  33.298  		String query = 
  33.299  			prefixes+
  33.300 @@ -242,15 +226,64 @@
  33.301  			" FILTER( str(?id1) < str(?id2) ) . \n"+
  33.302  			" ?s2 ex:geometry ?g2 . \n" +
  33.303  			" ?s1 ex:geometry ?g1 . \n"+
  33.304 -			" FILTER( geof:sf-touches(?g1, ?g2 )) . \n"+
  33.305 +			" FILTER( strdf:anyInteract(?g1, ?g2 ) ) . \n"+
  33.306  			"}";
  33.307  		
  33.308 -		@SuppressWarnings("unchecked")
  33.309 +		@SuppressWarnings("unchecked")	
  33.310  		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.311 -		assertEquals(1, bindings.size());
  33.312 +
  33.313 +		assertEquals(5, bindings.size());
  33.314 +		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"B\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.315 +		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"E\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.316 +		assertTrue(-1<bindings.indexOf("[id2=\"L2\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"L1\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.317 +		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"F\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.318  		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"G\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.319  	}
  33.320  	
  33.321 +//	@Test
  33.322 +//	public void testStrdfCovers() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.323 +//	{
  33.324 +//		String query = 
  33.325 +//			prefixes+
  33.326 +//			"SELECT DISTINCT ?id1 ?id2 \n"+
  33.327 +//			"WHERE { \n" +
  33.328 +//			" ?s1 ex:id ?id1 . \n"+
  33.329 +//			" ?s2 ex:id ?id2 . \n"+
  33.330 +//			" FILTER( str(?id1) != str(?id2) ) . \n"+
  33.331 +//			" ?s2 ex:geometry ?g2 . \n" +
  33.332 +//			" ?s1 ex:geometry ?g1 . \n"+
  33.333 +//			" FILTER( strdf:covers(?g1, ?g2 )) . \n"+
  33.334 +//			"}";
  33.335 +//		
  33.336 +//		@SuppressWarnings("unchecked")
  33.337 +//		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.338 +//		assertEquals(2, bindings.size());
  33.339 +//		assertTrue(-1<bindings.indexOf("[id2=\"F\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.340 +//		assertTrue(-1<bindings.indexOf("[id2=\"E\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.341 +//	}
  33.342 +//	
  33.343 +//	@Test
  33.344 +//	public void testStrdfCoveredBy() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.345 +//	{
  33.346 +//		String query = 
  33.347 +//			prefixes+
  33.348 +//			"SELECT DISTINCT ?id1 ?id2 \n"+
  33.349 +//			"WHERE { \n" +
  33.350 +//			" ?s1 ex:id ?id1 . \n"+
  33.351 +//			" ?s2 ex:id ?id2 . \n"+
  33.352 +//			" FILTER( str(?id1) != str(?id2) ) . \n"+
  33.353 +//			" ?s2 ex:geometry ?g2 . \n" +
  33.354 +//			" ?s1 ex:geometry ?g1 . \n"+
  33.355 +//			" FILTER( strdf:coveredBy(?g1, ?g2 )) . \n"+
  33.356 +//			"}";
  33.357 +//
  33.358 +//		@SuppressWarnings("unchecked")
  33.359 +//		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.360 +//		assertEquals(2, bindings.size());
  33.361 +//		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"F\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.362 +//		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"E\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.363 +//	}
  33.364 +
  33.365  	@Test
  33.366  	public void testStrdfRelate() throws MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException
  33.367  	{
  33.368 @@ -771,7 +804,7 @@
  33.369  		
  33.370  		@SuppressWarnings("unchecked")
  33.371  		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.372 -		assertEquals(40, bindings.size());
  33.373 +		assertEquals(60, bindings.size());
  33.374  		// too many results :)
  33.375  //		assertTrue(-1<bindings.indexOf("[s2=http://example.org/pol11;s1=http://example.org/pol1]"));
  33.376  	}
  33.377 @@ -793,11 +826,12 @@
  33.378  		
  33.379  		@SuppressWarnings("unchecked")
  33.380  		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.381 -		assertEquals(4, bindings.size());
  33.382 +		assertEquals(5, bindings.size());
  33.383  		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"B\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.384  		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"E\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.385  		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"F\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.386  		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"G\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.387 +		assertTrue(-1<bindings.indexOf("[id2=\"L2\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"L1\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.388  	}
  33.389  	
  33.390  	@Test
  33.391 @@ -838,11 +872,9 @@
  33.392  		
  33.393  		@SuppressWarnings("unchecked")
  33.394  		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.395 -		assertEquals(4, bindings.size());
  33.396 -		assertTrue(-1<bindings.indexOf("[id2=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"B\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.397 -		assertTrue(-1<bindings.indexOf("[id2=\"B\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.398 -		assertTrue(-1<bindings.indexOf("[id2=\"E\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.399 -		assertTrue(-1<bindings.indexOf("[id2=\"F\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"Z\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.400 +		assertEquals(2, bindings.size());		
  33.401 +		assertTrue(-1<bindings.indexOf("[id2=\"L1\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"L2\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.402 +		assertTrue(-1<bindings.indexOf("[id2=\"L2\"^^<http://www.w3.org/2001/XMLSchema#string>;id1=\"L1\"^^<http://www.w3.org/2001/XMLSchema#string>]"));
  33.403  	}
  33.404  	
  33.405  	@Test
  33.406 @@ -947,7 +979,7 @@
  33.407  		
  33.408  		@SuppressWarnings("unchecked")
  33.409  		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.410 -		assertEquals(40, bindings.size());
  33.411 +		assertEquals(60, bindings.size());
  33.412  		// too many results :)
  33.413  //		assertTrue(-1<bindings.indexOf("[s2=http://example.org/pol11;s1=http://example.org/pol1]"));
  33.414  	}
  33.415 @@ -1097,7 +1129,7 @@
  33.416  		
  33.417  		@SuppressWarnings("unchecked")
  33.418  		ArrayList<String> bindings = (ArrayList<String>) strabon.query(query,strabon.getSailRepoConnection());
  33.419 -		assertEquals(40, bindings.size());
  33.420 +		assertEquals(60, bindings.size());
  33.421  		// too many results :)
  33.422  //		assertTrue(-1<bindings.indexOf("[s2=http://example.org/pol11;s1=http://example.org/pol1]"));
  33.423  	}
    34.1 --- a/runtime/src/test/resources/spatial-tests-srid.nt	Mon Dec 10 18:18:40 2012 +0200
    34.2 +++ b/runtime/src/test/resources/spatial-tests-srid.nt	Mon Dec 10 22:27:44 2012 +0200
    34.3 @@ -8,6 +8,8 @@
    34.4  <http://example.org/pol7> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Polygon>.
    34.5  <http://example.org/pol8> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Polygon>.
    34.6  <http://example.org/pol9> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Polygon>.
    34.7 +<http://example.org/line20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/LineString>.
    34.8 +<http://example.org/line21> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/LineString>.
    34.9  <http://example.org/pol1> <http://example.org/id> "A"^^<http://www.w3.org/2001/XMLSchema#string>.
   34.10  <http://example.org/pol11> <http://example.org/id> "A"^^<http://www.w3.org/2001/XMLSchema#string>.
   34.11  <http://example.org/pol2> <http://example.org/id> "B"^^<http://www.w3.org/2001/XMLSchema#string>.
   34.12 @@ -18,6 +20,8 @@
   34.13  <http://example.org/pol7> <http://example.org/id> "G"^^<http://www.w3.org/2001/XMLSchema#string>.
   34.14  <http://example.org/pol8> <http://example.org/id> "H"^^<http://www.w3.org/2001/XMLSchema#string>.
   34.15  <http://example.org/pol9> <http://example.org/id> "Z"^^<http://www.w3.org/2001/XMLSchema#string>.
   34.16 +<http://example.org/line20> <http://example.org/id> "L1"^^<http://www.w3.org/2001/XMLSchema#string>.
   34.17 +<http://example.org/line21> <http://example.org/id> "L2"^^<http://www.w3.org/2001/XMLSchema#string>.
   34.18  <http://example.org/pol1> <http://example.org/geometry>  "POLYGON((1 6, 2 6, 2 7, 1 7, 1 6))"^^<http://strdf.di.uoa.gr/ontology#WKT>.
   34.19  <http://example.org/pol11> <http://example.org/geometry> "POLYGON((1 6, 2 6, 2 7, 1 7, 1 6))"^^<http://strdf.di.uoa.gr/ontology#WKT>.
   34.20  <http://example.org/pol2> <http://example.org/geometry>  "POLYGON((4 2, 5 2, 5 4, 4 4, 4 2))"^^<http://strdf.di.uoa.gr/ontology#WKT>.
   34.21 @@ -28,3 +32,5 @@
   34.22  <http://example.org/pol7> <http://example.org/geometry>  "POLYGON((4 8, 5 8, 5 9, 4 9, 4 8))"^^<http://strdf.di.uoa.gr/ontology#WKT>.
   34.23  <http://example.org/pol8> <http://example.org/geometry>  "POLYGON((8 9, 9 9, 9 10, 8 10, 8 9))"^^<http://strdf.di.uoa.gr/ontology#WKT>.
   34.24  <http://example.org/pol9> <http://example.org/geometry>  "POLYGON((3 3, 10 3, 10 8, 3 8, 3 3))"^^<http://strdf.di.uoa.gr/ontology#WKT>.
   34.25 +<http://example.org/line20> <http://example.org/geometry> "LINESTRING(11 3, 12 4)"^^<http://strdf.di.uoa.gr/ontology#WKT>.
   34.26 +<http://example.org/line21> <http://example.org/geometry> "LINESTRING(11 4, 12 3)"^^<http://strdf.di.uoa.gr/ontology#WKT>.
   34.27 \ No newline at end of file