Strabon

view README @ 1120:4beeabbf8843

caught MalformedQueryException in QueryBean so as not to print the exception in the log (it is not a bug)
author Babis Nikolaou <charnik@di.uoa.gr>
date Mon Apr 29 00:14:11 2013 +0300 (2013-04-29)
parents 0b0ef882b198
children 22d502a6ee1d
line source
1 Strabon
2 -----------
4 Introduction
5 ============
6 Strabon is a fully implemented semantic geospatial database system that can be
7 used to store linked geospatial data expressed in RDF and query them using an
8 extension of SPARQL. Strabon supports spatial selections, spatial joins, a rich
9 set of spatial functions similar to those offered by geospatial relational
10 database systems, support for multiple Coordinate Reference Systems and widely
11 used serializations for geometric objects such as WKT and GML. Strabon is built
12 on top of the well-known RDF store Sesame and extends Sesame’s components to be
13 able to manage thematic and spatial data that are stored in PostGIS.
15 The development of Strabon started in the context of European FP7 project
16 SemsorGrid4Env (Semantic Sensor Grids for Rapid Application Development for
17 Environmental Management) [http://www.semsorgrid4env.eu/]. Starting September
18 2011, Strabon is being utilized and extended with new functionalities in the
19 FP7 project TELEIOS (Virtual Observatory Infrastructure for Earth Observation
20 Data) [http://www.earthobservatory.eu/] which our group leads.
22 The query language of Strabon is called stSPARQL. stSPARQL can be used to query
23 data represented in an extension of RDF called stRDF. stRDF and stSPARQL have
24 been designed for representing and querying geospatial data that changes over
25 time (e.g., the growth of a city over the years due to new developments).
27 Currently, only the geospatial features of stSPARQL have been implemented fully.
28 The temporal features are the subject of current work.
30 Given the very close relationship between stSPARQL and GeoSPARQL which is a
31 recent OGC standard for an extension of SPARQL for querying geospatial metadata,
32 we recently provided support for the Core, Geometry and Geometry Topology
33 extension of GeoSPARQL.
36 Conformance to GeoSPARQL
37 ========================
38 Strabon implements the `Core', the `Topology Vocabulary Extension', the
39 `Geometry Extension', the `Geometry Topology Extension', and the `RDFS Entailment
40 Extension' except for Req. 25
41 (http://www.opengis.net/spec/geosparql/1.0/req/rdfs-entailment-extension/bgp-rdfs-ent).
43 With respect to GML, Strabon supports the GML Profile corresponding to Simple
44 Features, that is, GML Simple Features Profile 2.0.
47 Strabon Homepage
48 ================
49 The homepage of Strabon is at http://www.strabon.di.uoa.gr/.
52 Demo
53 ====
54 You can find a demo of the system Strabon at http://test.strabon.di.uoa.gr/NOA/.
57 How to build and run Strabon from command line
58 ==============================================
59 Assuming you have already downloaded Strabon and you are in the top-level
60 directory of Strabon, issue the following command to build it from command line:
62 $ mvn clean package
64 In order to run automatically the JUnit tests, pass the option `-DskipTests=true'
65 to the above command. The complete command is the following:
67 $ mvn -DskipTests=false clean package
69 In case of an error during building of Strabon and assuming that the error does
70 not come from the JUnit tests, please have a look at the `Known Issues' section
71 below. If none of the known issues of that section applies, please contact the
72 developers through the Strabon mailing-list or submit a corresponding bug
73 (see `Bugs' section below).
75 After you have successfully built Strabon, you have access to the following
76 components:
78 * Strabon Endpoint
80 This is a SPARQL endpoint for Strabon. It is distributed as a war file so
81 you may deploy it in a Tomcat container. You may find the war file under
82 directory `endpoint/target'.
84 * Strabon Endpoint (standalone)
86 This is a SPARQL endpoint for Strabon like the above one, but it differs
87 only in that it does not require the user to have already set up a Tomcat
88 container. The standalone Strabon Endpoint may be run by issuing the
89 following command:
91 $ java -jar endpoint-exec/target/strabon-endpoint-executable-${version}.jar
93 After issuing the above command, you may access the Strabon Endpoint at
94 the following URL: <http://localhost:8080/>.
96 Please see the page at <http://hg.strabon.di.uoa.gr/Strabon/rev/674f8f91162b>
97 to find out other options that you may pass to the Tomcat container that
98 will run by the above command.
100 SPECIAL NOTE: if you need to configure the connection details to the
101 underlying database, you may do so in two ways:
102 1. By modifying file `endpoint/WebContent/WEB-INF/connection.properties'
103 before building Strabon and executing the above command.
104 2. After executing the above command, by visiting the following page by a
105 browser: <http://localhost:8080/ChangeConnection>
107 * Strabon Endpoint Client
109 This is a Java client for interacting with Strabon Endpoint or any other
110 SPARQL endpoint. It is packaged as a jar file and may be found under
111 directory `endpoint-client/target/' with name
112 `strabon-endpoint-client-${version}.jar'. This jar contains any dependencies
113 to other code, so may copy and paste it to your project and start playing
114 with the code immediately.
116 * Strabon script
118 The `strabon' script is located under the `scripts/' directory and it is the
119 main command-line tool for interacting with Strabon. You may use it to store
120 RDF data with geospatial information or query/update it using one of
121 stSPARQL or GeoSPARQL query languages.
123 * Endpoint script
125 The `endpoint' script is located under the `scripts' directory and it is the
126 main command-line tool for interacting with a `Strabon Endpoint'. You may
127 use it to do any operation you would like to do with the `strabon' script
128 above, but in contrast to the `strabon' script you need to have access to a
129 Strabon endpoint. Of course, the `Strabon Endpoint Client' component above
130 can be used as well as a command-line tool. At the time of writing, the
131 `Strabon Endpoint Client' component supports only querying of RDF data with
132 geospatial information.
135 Getting Started
136 ===============
137 To get started with Strabon please have a look at the tutorial for the stRDF
138 data model and stSPARQL query language, the User Guide, and the Developer Guide.
140 stRDF and stSPARQL tutorial
141 http://www.strabon.di.uoa.gr/files/stSPARQL_tutorial.pdf
144 stSPARQL Reference
145 ~~~~~~~~~~~~~~~~~~
146 The reference for the spatial and temporal extension functions defined in
147 stSPARQL can be found at http://www.strabon.di.uoa.gr/stSPARQL#spatial and
148 http://www.strabon.di.uoa.gr/stSPARQL#temporals respectively.
151 User Guide
152 ~~~~~~~~~~
153 Assuming that you are familiar with Maven, the following steps need to be
154 followed in order to use Strabon using Eclipse:
156 1. Install PostgreSQL from http://www.postgresql.org/download/. At the time of
157 this writing the latest PostgreSQL version is 9.1.
158 2. Install PostGIS from http://postgis.refractions.net/download/. At the time of
159 this writing we have tested Strabon with PostGIS 1.5.3.
160 3. Install Maven from http://maven.apache.org/download.html. At the time of this
161 writing the latest Maven version is 3.0.4.
162 4. Install Eclipse from http://www.eclipse.org/downloads/. At the time of this
163 writing the latest Eclipse version is 3.7.2.
164 5. Install the m2e plugin for Eclipse from http://www.eclipse.org/m2e/.
165 6. Install the MercurialEclipse plugin for Eclipse from
166 http://javaforge.com/project/HGE .
167 7. From Eclipse, go to File --> Import --> Mercurial --> Clone Existing
168 Mercurial Repository --> Next. In the URL textarea paste the following
169 URL: http://hg.strabon.di.uoa.gr/StrabonUser and then press Next --> Next -->
170 Finish. If you used the default settings, you should have a new project named
171 StrabonMain. Right click on the project and select Configure --> Convert to
172 Maven project. Eclipse will enable Maven dependency management for the
173 project, download any dependencies and build the project.
176 Storing stRDF graphs and evaluating stSPARQL queries
177 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
178 You can see some examples in the classes gr.uoa.di.strabon.example.PostgisExample
179 and gr.uoa.di.strabon.example.PostgisExample2.
181 Tuning PostgreSQL
182 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183 The default settings of Postgres are rather conservative. As a result, parameter
184 tuning is neccessary for speeding up Postgres, therefore Strabon. If you are
185 using Strabon to compare its performance against your implementation of
186 stSPARQL/GeoSPARQL, you are *strongly* encouraged to contact us using the Strabon
187 Users mailing list for assistance on tuning Postgres.
189 You can follow the instructions below for tuning a Postgres server running on an
190 Ubuntu machine that is dedicated to PostgreSQL and Strabon.
192 1. Append the following text at the end of postgresql.conf.
193 *Uncomment* the appropriate lines.
195 ### RAM
196 ## 4 GB of RAM
197 #shared_buffers = 3GB
198 #effective_cache_size = 3GB
199 #maintenance_work_mem = 1GB
200 #work_mem = 2GB
201 ## 8 GB of RAM
202 #shared_buffers = 5GB
203 #effective_cache_size = 6GB
204 #maintenance_work_mem = 2GB
205 #work_mem = 5GB
206 ## 16 GB of RAM
207 #shared_buffers = 10GB
208 #effective_cache_size = 14GB
209 #maintenance_work_mem = 4GB
210 #work_mem = 10GB
211 ## 24 GB of RAM
212 #shared_buffers = 16GB
213 #effective_cache_size = 22GB
214 #maintenance_work_mem = 6GB
215 #work_mem = 15GB
216 ## 48 GB of RAM
217 #shared_buffers = 32GB
218 #effective_cache_size = 46GB
219 #maintenance_work_mem = 8GB
220 #work_mem = 30GB
221 ## 64 GB of RAM
222 # contact us to find out!
223 ### HD
224 ## RAID with ordinary 7.200 disks
225 #random_page_cost = 3.5 #3.0-3.5
226 ## High-End NAS/SAN
227 #random_page_cost = 2 #1.5-2.5
228 ## Amazon EBS/Heroku
229 #random_page_cost = 1.3 #1.1-2.0
230 ## SSD array
231 #random_page_cost = 2.0 #1.5-2.5
232 ### Misc
233 default_statistics_target = 10000
234 constraint_exclusion = on
235 checkpoint_completion_target = 0.9
236 wal_buffers = 32MB
237 checkpoint_segments = 64
238 ### Connections
239 max_connections = 10
241 2. Append the following lines at the end of /etc/sysctl.conf
242 *Uncomment* the appropriate lines.
244 ## 4 GB of RAM
245 #kernel.shmmax = 3758096384
246 #kernel.shmall = 3758096384
247 #kernel.shmmni = 4096
248 ## 8 GB of RAM
249 #kernel.shmmax = 5905580032
250 #kernel.shmall = 5905580032
251 #kernel.shmmni = 4096
252 ## 16 GB of RAM
253 #kernel.shmmax = 11274289152
254 #kernel.shmall = 11274289152
255 #kernel.shmmni = 4096
256 ## 24 GB of RAM
257 #kernel.shmmax = 17716740096
258 #kernel.shmall = 17716740096
259 #kernel.shmmni = 4096
260 ## 48 GB of RAM
261 #kernel.shmmax = 35433480192
262 #kernel.shmall = 35433480192
263 #kernel.shmmni = 4224
264 ## 64 GB of RAM
265 # contact us to find out!
267 3. Apply all changes by executing
269 $ sudo sysctl -p
270 $ sudo /etc/init.d/postgresql restart
272 4. Prepare for the next run by issuing the command
274 $ sudo -u postgres psql -c 'VACUUM ANALYZE;' db
276 or
278 $ psql -c 'VACUUM ANALYZE;' db
280 where db is the name of the Postgres database that Strabon will use.
283 Developer Guide
284 ~~~~~~~~~~~~~~~
285 Assuming that you are familiar with Maven, the following steps need to be
286 followed in order to use Strabon using Eclipse:
288 1. Install PostgreSQL from http://www.postgresql.org/download/. At the time of
289 this writing the latest PostgreSQL version is 9.1.
290 2. Install PostGIS from http://postgis.refractions.net/download/. At the time of
291 this writing we have tested Strabon with PostGIS 1.5.3.
292 3. Install Maven from http://maven.apache.org/download.html. At the time of this
293 writing the latest Maven version is 3.0.4.
294 4. Install Eclipse from http://www.eclipse.org/downloads/. At the time of this
295 writing the latest Eclipse version is 3.7.2.
296 5. Install the m2e plugin for Eclipse from http://www.eclipse.org/m2e/.
297 6. Install the MercurialEclipse plugin for Eclipse from
298 http://javaforge.com/project/HGE.
299 7. From Eclipse, go to File --> Import --> Mercurial --> Clone Existing
300 Mercurial Repository --> Next. In the URL textarea paste the following
301 URL: http://hg.strabon.di.uoa.gr/Strabon and then press Next --> Next -->
302 Finish. If you used the default settings, you should have a new project named
303 StrabonMain. Right click on the project and select Configure --> Convert to
304 Maven project. Eclipse will enable Maven dependency management for the
305 project, download any dependencies and build the project.
308 Tester Guide
309 ~~~~~~~~~~~~
310 Assuming again that you are familiar with Maven and Junit these are the steps
311 you need to follow to test the functionality of Strabon:
314 * Using Eclipse
316 If you want to create a new test:
318 1. Import Strabon into Eclipse as explained in the Developer Guide.
319 2. Go to strabon-testsuite project.
320 3. Create a new folder (Recommended folder name: <test's name>) and place inside the following files:
321 3.1. An ntriples or nquads file with the test dataset (with .nt or .nq extension).
322 3.2. Pairs of files with sparql test queries and expected test results in xml format.
323 Notice that each pair must have the same name and .rq extension for the queryFile and .srx extension for the resultsFile.
324 4. Create a test class that extends TemplateTest class.
325 5. If you have followed the recommendations the test is ready. If you have different names or location for your
326 files, insert them explicitly in the constructor of the class. WARNING: All prefixes must be placed in file "prefixes" so that
327 every time a namespace changes, we have to change it just once.
329 If you want to run a test:
331 1. Right-click on the test class.
332 2. Select "Run as JUnit Test".
333 3. Database properties are retrieved from database.properties file. If you want, you can change a property
334 "on the fly" with an environment variable.
337 * Command Line
339 If you want to run all the tests:
341 1. Go to Strabon directory (root directory of all the subprojects).
342 2. Run "mvn test".
343 3. Optionally you can pass an environment variable with "-DvariableName=variableValue".
346 Storing stRDF graphs and evaluating stSPARQL queries
347 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
348 You can see some examples in the classes
349 eu.earthobservatory.runtime.postgis.StoreOp and
350 eu.earthobservatory.runtime.postgis.QueryOp.
353 Download
354 ========
355 You can download the source code of the latest version of Strabon by accessing
356 our public mercurial repository located at http://hg.strabon.di.uoa.gr/Strabon.
357 You can find more information on how to use and extend Strabon at the Getting
358 Started section.
361 Publications
362 ============
363 You can learn about stRDF data model and stSPARQL query language employed in
364 Strabon by reading our tutorial under the Getting Started section and/or the
365 publications given on this page.
367 The current versions of stRDF and stSPARQL which are based on OGC standards are
368 presented in the following document:
369 * K. Kyzirakos, M. Karpathiotakis, and M. Koubarakis. Strabon: A Semantic
370 Geospatial DBMS. In Internatioanl Semantic Web Conference (ISWC'12). Boston,
371 USA, November 11-15, 2012.
372 [pdf: http://strabon.di.uoa.gr/files/strabon-iswc.pdf]
374 * Manolis Koubarakis, Kostis Kyzirakos, Babis Nikolaou, Michael Sioutis, and
375 Stavros Vassos. A data model and query language for an extension of RDF with
376 time and space. Deliverable D2.1, European ICT project TELEIOS, 2011.
377 [pdf: http://strabon.di.uoa.gr/files/deliv2-1-re-revised.pdf]
379 The initial versions of stRDF and stSPARQL that are based on constraint
380 databases are presented in the following publications:
381 * Manolis Koubarakis and Kostis Kyzirakos. Modeling and Querying Metadata in
382 the Semantic Sensor Web: the Model stRDF and the Query Language stSPARQL.
383 In 7th Extended Semantic Web Conference (ESWC 2010). Heraklion, Crete,
384 30 May - 03 June, 2010.
385 [pdf: http://strabon.di.uoa.gr/files/stSPARQL.pdf]
387 * Kostis Kyzirakos, Manos Karpathiotakis and Manolis Koubarakis. Developing
388 Registries for the Semantic Sensor Web using stRDF and stSPARQL (short
389 paper).
390 In Proceedings of 3rd International workshop on Semantic Sensor Networks
391 2010, in conjunction with ISWC 2010, November 2010, Shanghai, China.
392 [pdf: http://strabon.di.uoa.gr/files/strabon.pdf]
394 Applications of stRDF, stSPARQL, and the system Strabon are described here:
395 * Alasdair J. G. Gray, Raúl García-Castro, Kostis Kyzirakos, Manos
396 Karpathiotakis, Jean-Paul Calbimonte, Kevin Page, Jason Sadler, Alex
397 Frazer, Ixent Galpin, Alvaro A. A. Fernandes, Norman W. Paton, Oscar
398 Corcho, Manolis Koubarakis, David De Roure, Kirk Martinez and Asunción
399 Gómez-Pérez. A Semantically Enabled Service Architecture for Mashups over
400 Streaming and Stored Data. In 8th Extended Semantic Web Conference (ESWC
401 2011). Heraklion, Crete, May 20 - June 2, 2011.
402 [pdf: http://strabon.di.uoa.gr/files/Gray2011Architecture.pdf]
404 * A.J.G. Gray, J. Sadler, O. Kit, K. Kyzirakos, M. Karpathiotakis, J.-P.
405 Calbimonte, K. Page, R. García-Castro, A. Frazer, I. Galpin, A.A.A.
406 Fernandes, N.W. Paton, O. Corcho, M. Koubarakis, D.D. Roure, K. Martinez,
407 A. Gómez-Pérez. A Semantic Sensor Web for Environmental Decision Support
408 Applications. Sensors. 11, 8855-8887.
409 [pdf: http://strabon.di.uoa.gr/files/sensors-11-08855.pdf]
411 Coming up soon:
412 Strabon will soon support an extension of RDF for incomplete geospatial
413 information. The following publication gives a preview of the relevant research
414 problems:
415 * M. Koubarakis, K. Kyzirakos, M. Karpathiotakis, C. Nikolaou, M. Sioutis,
416 S. Vassos, D. Michail, T. Herekakis, C. Kontoes and I. Papoutsis. Challenges
417 for Qualitative Spatial Reasoning in Linked Geospatial Data. In Proceedings
418 of IJCAI 2011 Workshop on Benchmarks and Applications of Spatial Reasoning,
419 Barcelona, Spain.
420 [pdf: http://www.earthobservatory.eu/publications/SciQL_ADASS2011.pdf]
422 * C. Nikolaou and M. Koubarakis: "Querying Linked Geospatial Data with
423 Incomplete Information". In 5th International Terra Cognita Workshop -
424 Foundations, Technologies and Applications of the Geospatial Web. In
425 conjunction with the 11th International Semantic Web Conference, Boston,
426 USA, November, 2012.
427 [http://www.earthobservatory.eu/publications/iswc-workshop.pdf]
430 Contributors
431 ============
432 The system Strabon has been developed by the following members of our team:
434 * Manos Karpathiotakis <mk@di.uoa.gr>
435 * Kostis Kyzirakos <kkyzir@di.uoa.gr>
436 * Manolis Koubarakis <koubarak@di.uoa.gr>
437 * Giorgos Garbis <ggarbis@di.uoa.gr>
438 * Konstantina Bereta <konstantina.bereta@di.uoa.gr>
439 * Charalampos Nikolaou <charnik@di.uoa.gr>
440 * Stella Gianakopoulou <sgian@di.uoa.gr>
441 * Panagiotis Smeros <psmeros@di.uoa.gr>
442 * Kallirroi Dogani <kallirroi@di.uoa.gr>
445 Mailing-list
446 ============
447 Currently, we maintain the following mailing lists:
449 * Strabon-users, is used as a communication channel for Strabon users.
450 To subscribe to the mailing-list, please visit page
451 http://cgi.di.uoa.gr/~mailman/listinfo/strabon-users. To post e-mails
452 to Strabon-users mailing-list, write to strabon-users@di.uoa.gr.
454 * Strabon-devel, is used as a communication channel with the developers
455 of Strabon. To subscribe to the mailing-list, please visit page
456 http://cgi.di.uoa.gr/~mailman/listinfo/strabon-devel. To post e-mails
457 to Strabon-devel mailing-list, write to strabon-devel@di.uoa.gr.
460 Bugs
461 ====
462 Please report bugs to http://bug.strabon.di.uoa.gr/report or
463 the Strabon-devel mailing-list Strabon-devel@di.uoa.gr.
466 Known Issues
467 ============
468 * By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs received
469 from a browser. This can cause problems when encoding is UTF-8, and you are using
470 international characters. In order to fix this, edit conf/server.xml and find the
471 line where the Connector is defined. Add the parameter URIEncoding and set it to
472 UTF-8. For example:
474 <Connector port="8080" protocol="HTTP/1.1"
475 connectionTimeout="20000"
476 URIEncoding="UTF-8"
477 redirectPort="8443" />
479 * Building and executing any maven goals fails for maven versions <3.0 due to a
480 dependency to the `shade' plugin that is available only for maven version 3.0
481 (http://maven.apache.org/plugins/maven-shade-plugin/). In such systems, you may
482 disable execution of this plugin by setting the environmental variable
483 `shade.skip'. For example, to build Strabon using maven version 2.0 you may
484 execute the following command:
486 $ mvn clean package -Dshade.skip
488 * When using MonetDB as a backend, the following source code of MonetDB must be
489 used:
490 https://hg.strabon.di.uoa.gr/MonetDB/
493 License
494 =======
495 This Source Code Form is subject to the terms of the Mozilla Public
496 License, v. 2.0. If a copy of the MPL was not distributed with this
497 file, You can obtain one at http://mozilla.org/MPL/2.0/.
499 Copyright (C) 2010, 2011, 2012, Pyravlos Team
501 http://www.strabon.di.uoa.gr/
504 How to apply the license
505 ========================
506 * In the beginning of script files (after the shell directive) paste the
507 following statement:
508 #
509 # This Source Code Form is subject to the terms of the Mozilla Public
510 # License, v. 2.0. If a copy of the MPL was not distributed with this
511 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
512 #
513 # Copyright (C) 2010, 2011, 2012, Pyravlos Team
514 #
515 # http://www.strabon.di.uoa.gr/
516 #
518 * In the beginning of Java source code files paste the following statement:
519 /**
520 * This Source Code Form is subject to the terms of the Mozilla Public
521 * License, v. 2.0. If a copy of the MPL was not distributed with this
522 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
523 *
524 * Copyright (C) 2010, 2011, 2012, Pyravlos Team
525 *
526 * http://www.strabon.di.uoa.gr/
527 */
529 * In the beginning of HTML/XML files paste the following statement:
530 <!-- This Source Code Form is subject to the terms of the Mozilla Public
531 - License, v. 2.0. If a copy of the MPL was not distributed with this
532 - file, You can obtain one at http://mozilla.org/MPL/2.0/.
533 -
534 - Copyright (C) 2010, 2011, 2012, Pyravlos Team
535 -
536 - http://www.strabon.di.uoa.gr/
537 -->