Strabon
changeset 1366:9330425ec8b1
added tests for geof:getSRID(); see bug #32 (I have fixed it, but not commited it yet)
line diff
1.1 --- a/runtime/src/main/resources/log4j.properties Thu Sep 18 13:33:46 2014 +0300 1.2 +++ b/runtime/src/main/resources/log4j.properties Fri Sep 19 14:35:30 2014 +0300 1.3 @@ -21,3 +21,4 @@ 1.4 log4j.logger.org.openrdf.query.parser.QueryParserRegistry=INFO 1.5 log4j.logger.org.openrdf.sail.generaldb.managers.TripleTableManager=INFO 1.6 log4j.logger.info.aduna.lang.service.ServiceRegistry=INFO 1.7 +#log4j.logger.org.openrdf.sail.postgis.evaluation.PostGISEvaluation=DEBUG
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/testsuite/src/test/java/eu/earthobservatory/testsuite/geoSPARQL/BasicFunctionsTest.java Fri Sep 19 14:35:30 2014 +0300 2.3 @@ -0,0 +1,18 @@ 2.4 +/** 2.5 + * This Source Code Form is subject to the terms of the Mozilla Public 2.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 2.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. 2.8 + * 2.9 + * Copyright (C) 2012, 2013, 2014 Pyravlos Team 2.10 + * 2.11 + * http://www.sextant.di.uoa.gr/ 2.12 + */ 2.13 +package eu.earthobservatory.testsuite.geoSPARQL; 2.14 + 2.15 +import eu.earthobservatory.testsuite.utils.TemplateTest; 2.16 + 2.17 +/** 2.18 + * @author Charalampos Nikolaou <charnik@di.uoa.gr> 2.19 + */ 2.20 +public class BasicFunctionsTest extends TemplateTest { } 2.21 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/testsuite/src/test/resources/geoSPARQL/BasicFunctionsTest/BasicFunctionsTest.nt Fri Sep 19 14:35:30 2014 +0300 3.3 @@ -0,0 +1,6 @@ 3.4 +<http://ex.org/strdf_2100> <http://strdf.di.uoa.gr/ontology#hasGeometry> "POINT(476083.63 4203777.20);<http://www.opengis.net/def/crs/EPSG/0/2100>"^^<http://strdf.di.uoa.gr/ontology#WKT> . 3.5 +<http://ex.org/strdf_crs84> <http://strdf.di.uoa.gr/ontology#hasGeometry> "POINT(23.729359899999963 37.983917)"^^<http://strdf.di.uoa.gr/ontology#WKT> . 3.6 +<http://ex.org/strdf_4326> <http://strdf.di.uoa.gr/ontology#hasGeometry> "POINT(37.983917 23.729359899999963);<http://www.opengis.net/def/crs/EPSG/0/4326>"^^<http://strdf.di.uoa.gr/ontology#WKT> . 3.7 +<http://ex.org/geosparql_4326> <http://strdf.di.uoa.gr/ontology#hasGeometry> "<http://www.opengis.net/def/crs/EPSG/0/4326> POINT(37.983917 23.729359899999963)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . 3.8 +<http://ex.org/geosparql_crs84> <http://strdf.di.uoa.gr/ontology#hasGeometry> "POINT(23.729359899999963 37.983917)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . 3.9 +<http://ex.org/geosparql_2100> <http://strdf.di.uoa.gr/ontology#hasGeometry> "<http://www.opengis.net/def/crs/EPSG/0/2100> POINT(476083.63 4203777.20)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> . 3.10 \ No newline at end of file
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/testsuite/src/test/resources/geoSPARQL/BasicFunctionsTest/getSRIDFromConstantTest1.rq Fri Sep 19 14:35:30 2014 +0300 4.3 @@ -0,0 +1,2 @@ 4.4 +SELECT DISTINCT (geof:getSRID(strdf:transform("<http://www.opengis.net/def/crs/EPSG/0/2100> POINT(0 1)"^^geo:wktLiteral, <http://www.opengis.net/def/crs/EPSG/0/4326>)) as ?srid) 4.5 +WHERE { ?s ?p ?o }
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/testsuite/src/test/resources/geoSPARQL/BasicFunctionsTest/getSRIDFromConstantTest1.srx Fri Sep 19 14:35:30 2014 +0300 5.3 @@ -0,0 +1,13 @@ 5.4 +<?xml version='1.0' encoding='UTF-8'?> 5.5 + <sparql xmlns='http://www.w3.org/2005/sparql-results#'> 5.6 + <head> 5.7 + <variable name='srid'/> 5.8 + </head> 5.9 + <results> 5.10 + <result> 5.11 + <binding name='srid'> 5.12 + <uri>http://www.opengis.net/def/crs/EPSG/0/4326</uri> 5.13 + </binding> 5.14 + </result> 5.15 + </results> 5.16 + </sparql> 5.17 \ No newline at end of file
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/testsuite/src/test/resources/geoSPARQL/BasicFunctionsTest/getSRIDFromConstantTest2.rq Fri Sep 19 14:35:30 2014 +0300 6.3 @@ -0,0 +1,2 @@ 6.4 +SELECT DISTINCT (geof:getSRID("<http://www.opengis.net/def/crs/EPSG/0/2100> POINT(0 1)"^^geo:wktLiteral) as ?srid) 6.5 +WHERE { ?s ?p ?o } 6.6 \ No newline at end of file
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/testsuite/src/test/resources/geoSPARQL/BasicFunctionsTest/getSRIDFromConstantTest2.srx Fri Sep 19 14:35:30 2014 +0300 7.3 @@ -0,0 +1,13 @@ 7.4 +<?xml version='1.0' encoding='UTF-8'?> 7.5 + <sparql xmlns='http://www.w3.org/2005/sparql-results#'> 7.6 + <head> 7.7 + <variable name='srid'/> 7.8 + </head> 7.9 + <results> 7.10 + <result> 7.11 + <binding name='srid'> 7.12 + <uri>http://www.opengis.net/def/crs/EPSG/0/2100</uri> 7.13 + </binding> 7.14 + </result> 7.15 + </results> 7.16 + </sparql> 7.17 \ No newline at end of file
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/testsuite/src/test/resources/geoSPARQL/BasicFunctionsTest/getSRIDFromConstantTest3.rq Fri Sep 19 14:35:30 2014 +0300 8.3 @@ -0,0 +1,2 @@ 8.4 +SELECT DISTINCT (geof:getSRID("POINT(0 1)"^^geo:wktLiteral) as ?srid) 8.5 +WHERE { ?s ?p ?o } 8.6 \ No newline at end of file
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/testsuite/src/test/resources/geoSPARQL/BasicFunctionsTest/getSRIDFromConstantTest3.srx Fri Sep 19 14:35:30 2014 +0300 9.3 @@ -0,0 +1,13 @@ 9.4 +<?xml version='1.0' encoding='UTF-8'?> 9.5 + <sparql xmlns='http://www.w3.org/2005/sparql-results#'> 9.6 + <head> 9.7 + <variable name='srid'/> 9.8 + </head> 9.9 + <results> 9.10 + <result> 9.11 + <binding name='srid'> 9.12 + <uri>http://www.opengis.net/def/crs/OGC/1.3/CRS84</uri> 9.13 + </binding> 9.14 + </result> 9.15 + </results> 9.16 + </sparql> 9.17 \ No newline at end of file
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/testsuite/src/test/resources/geoSPARQL/BasicFunctionsTest/getSRIDFromConstantTest4.rq Fri Sep 19 14:35:30 2014 +0300 10.3 @@ -0,0 +1,2 @@ 10.4 +SELECT DISTINCT (geof:getSRID("POINT(0 1);http://www.opengis.net/def/crs/EPSG/0/2100"^^strdf:WKT) as ?srid) 10.5 +WHERE { ?s ?p ?o } 10.6 \ No newline at end of file
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 11.2 +++ b/testsuite/src/test/resources/geoSPARQL/BasicFunctionsTest/getSRIDFromConstantTest4.srx Fri Sep 19 14:35:30 2014 +0300 11.3 @@ -0,0 +1,13 @@ 11.4 +<?xml version='1.0' encoding='UTF-8'?> 11.5 + <sparql xmlns='http://www.w3.org/2005/sparql-results#'> 11.6 + <head> 11.7 + <variable name='srid'/> 11.8 + </head> 11.9 + <results> 11.10 + <result> 11.11 + <binding name='srid'> 11.12 + <uri>http://www.opengis.net/def/crs/EPSG/0/2100</uri> 11.13 + </binding> 11.14 + </result> 11.15 + </results> 11.16 + </sparql> 11.17 \ No newline at end of file