Strabon

changeset 976:f880f694108f

Merge.
author Panayiotis Smeros <psmeros@di.uoa.gr>
date Thu Apr 04 17:17:16 2013 +0300 (2013-04-04)
parents 11e81ae216cb a60fced07da5
children 1c9314288714 23ec0f6954c2
files
line diff
     1.1 --- a/README	Thu Apr 04 17:16:15 2013 +0300
     1.2 +++ b/README	Thu Apr 04 17:17:16 2013 +0300
     1.3 @@ -175,7 +175,7 @@
     1.4  ## 64 GB of RAM
     1.5  # contact us to find out!
     1.6  
     1.7 -3. Aply all changes by executing
     1.8 +3. Apply all changes by executing
     1.9  
    1.10  $ sudo sysctl -p
    1.11  $ sudo /etc/init.d/postgresql restart
     2.1 --- a/monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBQueryBuilder.java	Thu Apr 04 17:16:15 2013 +0300
     2.2 +++ b/monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBQueryBuilder.java	Thu Apr 04 17:17:16 2013 +0300
     2.3 @@ -102,6 +102,8 @@
     2.4  import org.openrdf.sail.rdbms.exceptions.RdbmsException;
     2.5  import org.openrdf.sail.rdbms.exceptions.UnsupportedRdbmsOperatorException;
     2.6  
     2.7 +import eu.earthobservatory.constants.GeoConstants;
     2.8 +
     2.9  /**
    2.10   * Constructs an SQL query from {@link GeneralDBSqlExpr}s and {@link GeneralDBFromItem}s.
    2.11   * 
    2.12 @@ -918,7 +920,7 @@
    2.13  			else
    2.14  			{
    2.15  				//4326 by default - Software House additions
    2.16 -				filter.append("4326");
    2.17 +				filter.append(String.valueOf(GeoConstants.defaultSRID));
    2.18  			}
    2.19  		}
    2.20  
    2.21 @@ -957,7 +959,7 @@
    2.22  			e.printStackTrace();
    2.23  		}
    2.24  
    2.25 -		filter.append(" GeomFromText('"+poly.toWKT() +"',4326)");
    2.26 +		filter.append(" GeomFromText('"+poly.toWKT() +"',"+String.valueOf(GeoConstants.defaultSRID)+")");
    2.27  
    2.28  		return raw;
    2.29  	}
    2.30 @@ -1512,7 +1514,7 @@
    2.31  				if(units.equals("metre") || units.equals("meter"))
    2.32  				{					
    2.33  					filter.appendComma();
    2.34 -					filter.append("4326");
    2.35 +					filter.append(String.valueOf(GeoConstants.defaultSRID));
    2.36  					filter.closeBracket(); //close st_transform
    2.37  					filter.closeBracket(); //close geography
    2.38  					
    2.39 @@ -1526,7 +1528,7 @@
    2.40  				else if(units.equals("degree"))
    2.41  				{
    2.42  					filter.appendComma();
    2.43 -					filter.append("4326");
    2.44 +					filter.append(String.valueOf(GeoConstants.defaultSRID));
    2.45  					filter.closeBracket(); //close st_transform
    2.46  					
    2.47  					filter.appendComma();
    2.48 @@ -1595,14 +1597,14 @@
    2.49  				if(units.equals("metre") || units.equals("meter"))
    2.50  				{
    2.51  					filter.appendComma();
    2.52 -					filter.append("4326");
    2.53 +					filter.append(String.valueOf(GeoConstants.defaultSRID));
    2.54  					filter.closeBracket();
    2.55  					filter.closeBracket();
    2.56  				}
    2.57  				else if(units.equals("degree"))
    2.58  				{
    2.59  					filter.appendComma();
    2.60 -					filter.append("4326");
    2.61 +					filter.append(String.valueOf(GeoConstants.defaultSRID));
    2.62  					filter.closeBracket();
    2.63  				}
    2.64  
     3.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Thu Apr 04 17:16:15 2013 +0300
     3.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Thu Apr 04 17:17:16 2013 +0300
     3.3 @@ -9,6 +9,7 @@
     3.4  import java.util.List;
     3.5  
     3.6  import org.openrdf.query.algebra.evaluation.function.spatial.StrabonPolyhedron;
     3.7 +import org.openrdf.query.algebra.evaluation.function.spatial.WKTHelper;
     3.8  import org.openrdf.sail.generaldb.algebra.GeneralDBColumnVar;
     3.9  import org.openrdf.sail.generaldb.algebra.GeneralDBDateTimeColumn;
    3.10  import org.openrdf.sail.generaldb.algebra.GeneralDBDoubleValue;
    3.11 @@ -103,6 +104,8 @@
    3.12  import org.openrdf.sail.rdbms.exceptions.RdbmsException;
    3.13  import org.openrdf.sail.rdbms.exceptions.UnsupportedRdbmsOperatorException;
    3.14  
    3.15 +import eu.earthobservatory.constants.GeoConstants;
    3.16 +
    3.17  /**
    3.18   * Constructs an SQL query from {@link GeneralDBSqlExpr}s and {@link GeneralDBFromItem}s.
    3.19   * 
    3.20 @@ -926,8 +929,8 @@
    3.21  			}
    3.22  			else
    3.23  			{
    3.24 -				//4326 by default - Software House additions
    3.25 -				filter.append("4326");
    3.26 +				// set default SRID ({@link GeoConstants#defaultSRID})
    3.27 +				filter.append(String.valueOf(GeoConstants.defaultSRID));
    3.28  			}
    3.29  		}
    3.30  
    3.31 @@ -966,7 +969,7 @@
    3.32  			e.printStackTrace();
    3.33  		}
    3.34  
    3.35 -		filter.append(" ST_GeomFromText('"+poly.toWKT() +"',4326)");
    3.36 +		filter.append(" ST_GeomFromText('"+poly.toWKT() +"',"+String.valueOf(GeoConstants.defaultSRID)+")");
    3.37  
    3.38  		return raw;
    3.39  	}
    3.40 @@ -1268,8 +1271,8 @@
    3.41  			else if(expr.getRightArg() instanceof GeneralDBStringValue)
    3.42  			{
    3.43  				String unparsedSRID = ((GeneralDBStringValue)expr.getRightArg()).getValue();
    3.44 -				//				int srid = Integer.parseInt(unparsedSRID.substring(unparsedSRID.lastIndexOf('/')+1));
    3.45 -				sridExpr = unparsedSRID.substring(unparsedSRID.lastIndexOf('/')+1);
    3.46 +				// TODO Check for other kinds of URIs (e.g., not only for EPSG)
    3.47 +				sridExpr = String.valueOf(WKTHelper.getSRID(unparsedSRID));
    3.48  				filter.append(sridExpr);
    3.49  				filter.closeBracket();
    3.50  			}
    3.51 @@ -1666,7 +1669,7 @@
    3.52  			if(units.equals("metre") || units.equals("meter"))
    3.53  			{					
    3.54  				filter.appendComma();
    3.55 -				filter.append("4326");
    3.56 +				filter.append(String.valueOf(GeoConstants.defaultSRID));
    3.57  				filter.closeBracket(); //close st_transform
    3.58  				filter.closeBracket(); //close geography
    3.59  				
    3.60 @@ -1680,7 +1683,7 @@
    3.61  			else if(units.equals("degree"))
    3.62  			{
    3.63  				filter.appendComma();
    3.64 -				filter.append("4326");
    3.65 +				filter.append(String.valueOf(GeoConstants.defaultSRID));
    3.66  				filter.closeBracket(); //close st_transform
    3.67  				
    3.68  				filter.appendComma();
    3.69 @@ -1740,14 +1743,14 @@
    3.70  			if(units.equals("metre") || units.equals("meter"))
    3.71  			{
    3.72  				filter.appendComma();
    3.73 -				filter.append("4326");
    3.74 +				filter.append(String.valueOf(GeoConstants.defaultSRID));
    3.75  				filter.closeBracket();
    3.76  				filter.closeBracket();
    3.77  			}
    3.78  			else if(units.equals("degree"))
    3.79  			{
    3.80  				filter.appendComma();
    3.81 -				filter.append("4326");
    3.82 +				filter.append(String.valueOf(GeoConstants.defaultSRID));
    3.83  				filter.closeBracket();
    3.84  			}	
    3.85