Strabon

view README @ 1168:c003d2c1a053

updated ChangeLog
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Fri May 10 16:10:00 2013 +0300 (2013-05-10)
parents cd170a3682dd
children da14a303bf2c
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 have been implemented under the "temporals" branch of the repository.
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 package
64 The above command runs automatically the JUnit tests. To skip them pass option
65 `-DskipTests=true' to the above command. The complete command is the following:
67 $ mvn -DskipTests=true 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 for your
326 files, insert them explicitly in the constructor of TemplateTest class (super class).
328 If you want to run a test:
330 1. Right-click on the test class.
331 2. Select "Run as JUnit Test".
332 3. Database properties are retrieved from database.properties file. If you want, you can change a property
333 "on the fly" with an environment variable.
336 * Command Line
338 If you want to run all the tests:
340 1. Go to Strabon directory (root directory of all the subprojects).
341 2. Run "mvn test".
342 3. Optionally you can pass an environment variable with "-DvariableName=variableValue".
345 Storing stRDF graphs and evaluating stSPARQL queries
346 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
347 You can see some examples in the classes
348 eu.earthobservatory.runtime.postgis.StoreOp and
349 eu.earthobservatory.runtime.postgis.QueryOp.
352 Download
353 ========
354 You can download the source code of the latest version of Strabon by accessing
355 our public mercurial repository located at http://hg.strabon.di.uoa.gr/Strabon.
356 You can find more information on how to use and extend Strabon at the Getting
357 Started section.
360 Publications
361 ============
362 You can learn about stRDF data model and stSPARQL query language employed in
363 Strabon by reading our tutorial under the Getting Started section and/or the
364 publications given on this page.
366 The current versions of stRDF and stSPARQL which are based on OGC standards are
367 presented in the following documents:
368 * K. Kyzirakos, M. Karpathiotakis, and M. Koubarakis. Strabon: A Semantic
369 Geospatial DBMS. In Internatioanl Semantic Web Conference (ISWC'12). Boston,
370 USA, November 11-15, 2012.
371 [pdf: http://strabon.di.uoa.gr/files/strabon-iswc.pdf]
373 * Manolis Koubarakis, Kostis Kyzirakos, Babis Nikolaou, Michael Sioutis, and
374 Stavros Vassos. A data model and query language for an extension of RDF with
375 time and space. Deliverable D2.1, European ICT project TELEIOS, 2011.
376 [pdf: http://strabon.di.uoa.gr/files/deliv2-1-re-revised.pdf]
378 The temporal features of stRDF and stSPARQL are presented in the following
379 document:
380 * K. Bereta, P. Smeros and M. Koubarakis. Representing and Querying the
381 Valid Time of Triples for Linked Geospatial Data. In the 10th Extended
382 Semantic Web Conference (ESWC 2013). Montpellier, France. May 26-30, 2013.
383 [pdf: http://www.strabon.di.uoa.gr/files/eswc2013.pdf]
385 The initial versions of stRDF and stSPARQL that are based on constraint
386 databases are presented in the following publications:
387 * Manolis Koubarakis and Kostis Kyzirakos. Modeling and Querying Metadata in
388 the Semantic Sensor Web: the Model stRDF and the Query Language stSPARQL.
389 In 7th Extended Semantic Web Conference (ESWC 2010). Heraklion, Crete,
390 30 May - 03 June, 2010.
391 [pdf: http://strabon.di.uoa.gr/files/stSPARQL.pdf]
393 * Kostis Kyzirakos, Manos Karpathiotakis and Manolis Koubarakis. Developing
394 Registries for the Semantic Sensor Web using stRDF and stSPARQL (short
395 paper).
396 In Proceedings of 3rd International workshop on Semantic Sensor Networks
397 2010, in conjunction with ISWC 2010, November 2010, Shanghai, China.
398 [pdf: http://strabon.di.uoa.gr/files/strabon.pdf]
400 Applications of stRDF, stSPARQL, and the system Strabon are described here:
401 * Alasdair J. G. Gray, Raúl García-Castro, Kostis Kyzirakos, Manos
402 Karpathiotakis, Jean-Paul Calbimonte, Kevin Page, Jason Sadler, Alex
403 Frazer, Ixent Galpin, Alvaro A. A. Fernandes, Norman W. Paton, Oscar
404 Corcho, Manolis Koubarakis, David De Roure, Kirk Martinez and Asunción
405 Gómez-Pérez. A Semantically Enabled Service Architecture for Mashups over
406 Streaming and Stored Data. In 8th Extended Semantic Web Conference (ESWC
407 2011). Heraklion, Crete, May 20 - June 2, 2011.
408 [pdf: http://strabon.di.uoa.gr/files/Gray2011Architecture.pdf]
410 * A.J.G. Gray, J. Sadler, O. Kit, K. Kyzirakos, M. Karpathiotakis, J.-P.
411 Calbimonte, K. Page, R. García-Castro, A. Frazer, I. Galpin, A.A.A.
412 Fernandes, N.W. Paton, O. Corcho, M. Koubarakis, D.D. Roure, K. Martinez,
413 A. Gómez-Pérez. A Semantic Sensor Web for Environmental Decision Support
414 Applications. Sensors. 11, 8855-8887.
415 [pdf: http://strabon.di.uoa.gr/files/sensors-11-08855.pdf]
417 Coming up soon:
418 Strabon will soon support an extension of RDF for incomplete geospatial
419 information. The following publication gives a preview of the relevant research
420 problems:
421 * M. Koubarakis, K. Kyzirakos, M. Karpathiotakis, C. Nikolaou, M. Sioutis,
422 S. Vassos, D. Michail, T. Herekakis, C. Kontoes and I. Papoutsis. Challenges
423 for Qualitative Spatial Reasoning in Linked Geospatial Data. In Proceedings
424 of IJCAI 2011 Workshop on Benchmarks and Applications of Spatial Reasoning,
425 Barcelona, Spain.
426 [pdf: http://www.earthobservatory.eu/publications/SciQL_ADASS2011.pdf]
428 * C. Nikolaou and M. Koubarakis: "Querying Linked Geospatial Data with
429 Incomplete Information". In 5th International Terra Cognita Workshop -
430 Foundations, Technologies and Applications of the Geospatial Web. In
431 conjunction with the 11th International Semantic Web Conference, Boston,
432 USA, November, 2012.
433 [http://www.earthobservatory.eu/publications/iswc-workshop.pdf]
436 Contributors
437 ============
438 The system Strabon has been developed by the following members of our team:
440 * Manos Karpathiotakis <mk@di.uoa.gr>
441 * Kostis Kyzirakos <kkyzir@di.uoa.gr>
442 * Manolis Koubarakis <koubarak@di.uoa.gr>
443 * Giorgos Garbis <ggarbis@di.uoa.gr>
444 * Konstantina Bereta <konstantina.bereta@di.uoa.gr>
445 * Charalampos Nikolaou <charnik@di.uoa.gr>
446 * Stella Gianakopoulou <sgian@di.uoa.gr>
447 * Panagiotis Smeros <psmeros@di.uoa.gr>
448 * Kallirroi Dogani <kallirroi@di.uoa.gr>
451 Mailing-list
452 ============
453 Currently, we maintain the following mailing lists:
455 * Strabon-users, is used as a communication channel for Strabon users.
456 To subscribe to the mailing-list, please visit page
457 http://cgi.di.uoa.gr/~mailman/listinfo/strabon-users. To post e-mails
458 to Strabon-users mailing-list, write to strabon-users@di.uoa.gr.
460 * Strabon-devel, is used as a communication channel with the developers
461 of Strabon. To subscribe to the mailing-list, please visit page
462 http://cgi.di.uoa.gr/~mailman/listinfo/strabon-devel. To post e-mails
463 to Strabon-devel mailing-list, write to strabon-devel@di.uoa.gr.
466 Bugs
467 ====
468 Please report bugs to http://bug.strabon.di.uoa.gr/report or
469 the Strabon-devel mailing-list Strabon-devel@di.uoa.gr.
472 Known Issues
473 ============
474 * By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs received
475 from a browser. This can cause problems when encoding is UTF-8, and you are using
476 international characters. In order to fix this, edit conf/server.xml and find the
477 line where the Connector is defined. Add the parameter URIEncoding and set it to
478 UTF-8. For example:
480 <Connector port="8080" protocol="HTTP/1.1"
481 connectionTimeout="20000"
482 URIEncoding="UTF-8"
483 redirectPort="8443" />
485 * Building and executing any maven goals fails for maven versions <3.0 due to a
486 dependency to the `shade' plugin that is available only for maven version 3.0
487 (http://maven.apache.org/plugins/maven-shade-plugin/). In such systems, you may
488 disable execution of this plugin by setting the environmental variable
489 `shade.skip'. For example, to build Strabon using maven version 2.0 you may
490 execute the following command:
492 $ mvn clean package -Dshade.skip
494 * When using MonetDB as a backend, the following source code of MonetDB must be
495 used:
496 https://hg.strabon.di.uoa.gr/MonetDB/
499 License
500 =======
501 This Source Code Form is subject to the terms of the Mozilla Public
502 License, v. 2.0. If a copy of the MPL was not distributed with this
503 file, You can obtain one at http://mozilla.org/MPL/2.0/.
505 Copyright (C) 2010, 2011, 2012, 2013 Pyravlos Team
507 http://www.strabon.di.uoa.gr/
510 How to apply the license
511 ========================
512 * In the beginning of script files (after the shell directive) paste the
513 following statement:
514 #
515 # This Source Code Form is subject to the terms of the Mozilla Public
516 # License, v. 2.0. If a copy of the MPL was not distributed with this
517 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
518 #
519 # Copyright (C) 2010, 2011, 2012, 2013 Pyravlos Team
520 #
521 # http://www.strabon.di.uoa.gr/
522 #
524 * In the beginning of Java source code files paste the following statement:
525 /**
526 * This Source Code Form is subject to the terms of the Mozilla Public
527 * License, v. 2.0. If a copy of the MPL was not distributed with this
528 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
529 *
530 * Copyright (C) 2010, 2011, 2012, 2013 Pyravlos Team
531 *
532 * http://www.strabon.di.uoa.gr/
533 */
535 * In the beginning of HTML/XML files paste the following statement:
536 <!-- This Source Code Form is subject to the terms of the Mozilla Public
537 - License, v. 2.0. If a copy of the MPL was not distributed with this
538 - file, You can obtain one at http://mozilla.org/MPL/2.0/.
539 -
540 - Copyright (C) 2010, 2011, 2012, 2013 Pyravlos Team
541 -
542 - http://www.strabon.di.uoa.gr/
543 -->