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