Strabon

changeset 936:6d82eca1cf7a

fixed Ticket #24: sfCrosses, sfOverlaps, ehOverlaps functions follow now the same approach as stSPARQL (ST_Relate PostGIS function is not used in these cases)
author Kallirroi Dogani <kallirroi@di.uoa.gr>
date Wed Mar 27 16:34:59 2013 +0200 (2013-03-27)
parents e9521141694b
children 802e52d68629
files postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java
line diff
     1.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Tue Mar 26 20:49:12 2013 +0200
     1.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Wed Mar 27 16:34:59 2013 +0200
     1.3 @@ -511,7 +511,9 @@
     1.4  	protected void append(GeneralDBSqlSF_Crosses expr, GeneralDBSqlExprBuilder filter)
     1.5  			throws UnsupportedRdbmsOperatorException
     1.6  			{
     1.7 -		appendgeoSPARQLSpatialRelation(expr, filter,SpatialFunctionsPostGIS.SF_Crosses);
     1.8 +		//follow the same approach as stSPARQL, because the implementation used in
     1.9 +		//appendgeoSPARQLSpatialRelation (which is based on ST_Relate) is not correct for this case
    1.10 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Crosses);
    1.11  			}
    1.12  
    1.13  	@Override
    1.14 @@ -539,7 +541,9 @@
    1.15  	protected void append(GeneralDBSqlSF_Overlaps expr, GeneralDBSqlExprBuilder filter)
    1.16  			throws UnsupportedRdbmsOperatorException
    1.17  			{
    1.18 -		appendgeoSPARQLSpatialRelation(expr, filter,SpatialFunctionsPostGIS.SF_Overlaps);
    1.19 +		//follow the same approach as stSPARQL, because the implementation used in
    1.20 +		//appendgeoSPARQLSpatialRelation (which is based on ST_Relate) is not correct for this case
    1.21 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Overlaps);
    1.22  			}
    1.23  
    1.24  	@Override
    1.25 @@ -610,7 +614,9 @@
    1.26  	protected void append(GeneralDBSqlEgenhofer_Overlap expr, GeneralDBSqlExprBuilder filter)
    1.27  			throws UnsupportedRdbmsOperatorException
    1.28  			{
    1.29 -		appendgeoSPARQLSpatialRelation(expr, filter,SpatialFunctionsPostGIS.EH_Overlap);
    1.30 +		//follow the same approach as stSPARQL, because the implementation used in
    1.31 +		//appendgeoSPARQLSpatialRelation (which is based on ST_Relate) is not correct for this case
    1.32 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Overlaps);
    1.33  			}
    1.34  
    1.35  	//RCC8
    1.36 @@ -1388,7 +1394,7 @@
    1.37  	}	
    1.38  	/***/
    1.39  
    1.40 -	//Used in all the generaldb stsparql boolean spatial functions of the form ST_Function(?GEO1,?GEO2) 
    1.41 +	//Used in all the generaldb stsparql (and geosparql) boolean spatial functions of the form ST_Function(?GEO1,?GEO2) 
    1.42  	//EXCEPT ST_Transform!!!
    1.43  	protected void appendGeneralDBSpatialFunctionBinary(BinaryGeneralDBOperator expr, GeneralDBSqlExprBuilder filter, SpatialFunctionsPostGIS func)
    1.44  			throws UnsupportedRdbmsOperatorException