<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>GeoTriples: a Tool for Publishing Geospatial Data as RDF Graphs Using R2RML Mappings</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kostis Kyzirakos</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ioannis Vlachopoulos</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dimitrianos Savva</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stefan Manegold</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Manolis Koubarakis</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Centrum Wiskunde &amp; Informatica</institution>
          ,
          <addr-line>Amsterdam</addr-line>
          ,
          <country country="NL">The Netherlands</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>National and Kapodistrian University of Athens</institution>
          ,
          <country country="GR">Greece</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper we present the tool GeoTriples that allows the transformation of Earth Observation data and geospatial data into RDF graphs, by using and extending the R2RML mapping language to be able to deal with the speci cities of geospatial data. GeoTriples is a semiautomated tool that transforms geospatial information into RDF following the state of the art vocabularies like GeoSPARQL and stSPARQL, but at the same time it is not tightly coupled to a speci c vocabulary.</p>
      </abstract>
      <kwd-group>
        <kwd>Linked Geospatial Data</kwd>
        <kwd>data publishing</kwd>
        <kwd>GeoSPARQL</kwd>
        <kwd>stSPARQL</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        In the last few years there has been signi cant e ort on publishing EO and
geospatial data sources as linked open data. However, the problem of publishing
geospatial data sources into RDF graphs using a generic and extensible
framework has received little attention as it has only recently emerged. Instead,
scripting methods, that were adapted to the subject, were employed mostly for this
task, such as custom python scripts developed in project TELEIOS3. However,
some work towards developing automated methods for translating geospatial
data into RDF has been presented in the latest LGD Workshop4. In this paper
we present the tool GeoTriples that allows the transformation of geospatial data
stored in spatially-enabled relational databases and raw les. It is implemented
as an extension to the D2RQ platform5 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and goes beyond the state of the
art by extending the R2RML mapping language6 to deal with the speci ties of
geospatial data. GeoTriples uses GeoSPARQL7 as the target vocabulary but the
user is free to use any vocabulary she nds appropriate.
      </p>
      <p>NAME TYPE WIDTH
Zeitlbach stream 1
Mangfall river 25
Triftbach canal 10
osm_w:1 rdf:type geo:Feature ;
osm_ont:hasName "Mangfall"^^xsd:string ;
geo:hasGeometry osm_g:1 .
osm_g:1 rdf:type geo:Geometry ;
geo:dimension "2"^^xsd:integer .
(a) Example data from an ESRI shape le (b) Expected RDF triples about Mangfall
_:osm
rr:logicalTable [ rr:tableName "`osm`"; ];
rr:subjectMap [
rr:class geo:Feature;
rr:template "http://data.example.com/osm-waterways/ _:osmGeometry
rrrr::pprrrreerrdd::iipoccrbaaejttdeeeicOOctbbaMjjtaFeeepeccatto[tMMsuaarmrrppr:re:h:/[[cadioasdlNt/uaa{mtm`neygp;i"ed``Nx}As"Md;E:`s]"t;;ri]n;g;]; rrrrrr:::lspourrrrgberrrijd:::ceitcpaccelrltamaeTMtpsdaaelsibpOaclbtage[jeteeoec[":tGhgrMteeartoo:ppm:t:dea[t/ib/rmlGdeyeea;nNotsamaime.oetenrx;"ya`/moipsdlm/e`{."`c;goim]d/;`o}s"m;-w]a;terways/
rrrr::porrrbrrej::depjicrraoctrrriaM::entacpnCephatoirTng[lerdedniiotpt:lih""eoaggsnsiiMGdda[e""po;;m_e]:t;orsy]m;G;e]o.metry; rr:orbrjxe):cr;ttrrrMx]ara:nxpf]s[:u;fra[norrc]r:gt.mcuiaomotleniunomtgnnMeao["pf`:g(deiomme`n"s]ion;
(c) Mapping of thematic information</p>
      <p>
        (d) Mapping of geometric information
GeoTriples8 is an open source tool, that takes as input geospatial data that are
stored in a spatially enabled database, data that reside in raw les (e.g. ESRI
shape les) or the results that derive from processing of the aforementioned data
(e.g. a SciQL query over raster or array data). At a lower level, GeoTriples uses a
connector for each type of input data that transparently accesses and processes
the input data. It also consists of two main components: the mapping generator
and the R2RML processor. The mapping generator creates automatically an
R2RML mapping document from the input data source. The mapping is also
enriched with subject and predicate object maps so that the RDF graph that
will be produced follows the GeoSPARQL vocabulary. Geospatial information is
modeled using a variety of data models (e.g., relational, hierarchical) and is made
available using a variety of formats (e.g., ESRI shape les, KML documents). In
order to deal with these speci cities of geospatial information, we extended the
R2RML language to allow the representation of a transformation function over
the input data via an object map. In [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] we provide more information about our
approach. Figure 1 presents an example of such a transformation. The R2RML
processor is responsible for producing the desired RDF output by taking into
account the mapping document generated, which is also optionally edited by the
user. When the R2RML processor of GeoTriples detects an object map with a
transformation function, it applies on the y this function on the serialization
of the geometry described in the subject map. However, if the input data source
is a spatially enabled database, it generates the appropriate SQL queries that
push these transformations to the underlying DBMS.
      </p>
      <sec id="sec-1-1">
        <title>8https://sourceforge.net/projects/geotriples/</title>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Using GeoTriples in a real-world scenario</title>
      <p>In this section we present how we will demonstrate the tool GeoTriples in the
context of a precision farming application that is developed by the FP7 EU
project LEO9. The application combines traditional geospatial data with linked
geospatial data for enhancing the quality of precision farming activities. Precision
farming aims to solve numerous problems for farmers such as the minimization
of the environmental pollution by fertilizers. For dealing with this issue, the
farmers have to comply with many legal and technical guidelines that require
the combination of information that resides in diverse information sources. In
this section we present how linked geospatial data can form the knowledge base
for providing solutions for this problem. We will publish the following datasets
as RDF graphs using GeoTriples in order to use them in the precision farming
application.</p>
      <p>OpenStreetMap (OSM) is a collaborative project for publishing free maps
of the world. OSM maintains a community-driven global editable map that
gathers map data in a crowdsourcing fashion.</p>
      <p>Talking Fields aims to increase the e ciency of agricultural production
via precision farming by means of geo-information services integrating space
and ground-based assets. It produces products for improved soil probing using
satellite-based zone maps, and provide services for monitoring crop development
through provision of biomass maps and yield estimates.</p>
      <p>Natura 2000 is a European ecological network where national authorities
submit a standard data form that describes each site and its ecology in order to
be characterized as a Natura site.</p>
      <p>Corine Land Cover (CLC) is an activity of the European Environment
Agency that collects data regarding the land cover of European countries.</p>
      <p>
        In this demo we will use GeoTriples in order to produce the R2RML
mappings that dictate the process of generating the desired RDF output from the
above data. Then, using the R2RML processor of GeoTriples, we translate the
input data into RDF graphs and store the latter into the geospatial RDF store
Strabon10 [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <sec id="sec-2-1">
        <title>9http://www.linkedeodata.eu 10http://www.strabon.di.uoa.gr/</title>
        <p>SELECT DISTINCT ?field_name ?river_name
WHERE {?river rdf:type osmo:River;
osmo:hasName ?river_name;
geo:hasGeometry ?river_geo .
?river_geo geo:asWKT ?river_geowkt .
?field rdf:type tf:Field;
tfo:hasFieldName ?field_name;
tf:hasRasterCell ?cell .</p>
        <p>??cceellll_ggeeoo:gheaos:GaesoWmKeTtr?yf?iceledll__gegoeowk;t .</p>
        <p>FILTER(geof:distance(?river_geowkt,</p>
        <p>?field_geowkt, uom:meter)&lt;100)}
(a) GeoSPARQL Query
(b) Query results</p>
        <p>The user can use the graphical interface of GeoTriples that is displayed in
Figure 2 for publishing these datasets as RDF graphs. At rst the user de nes
the necessary credentials of the DBMS that stores the above datasets. Then, she
selects the tables and the columns that contain the information that she want to
publish as RDF graphs. Optionally, an existing ontology may be loaded, in order
to map the columns of the selected table to properties from the loaded ontology
and map the instances generated from the rows to a speci c class. Afterwards,
GeoTriples generates automatically the R2RML mappings and presents them
to the user. Finally, the user may either customize the generated mappings or
proceed with the generation of the RDF graph.</p>
        <p>A series of GeoSPARQL queries will be issued afterwards in Strabon for
providing the precision farming application with information like the location of
agricultural elds that are close to a river. This information allows the precision
farming application to take into account legal restrictions regarding distance
requirements when preparing the prescription maps that the farmers will utilize
afterwards. In Figure 3a we present a GeoSPARQL query that discovers this
information, and in Figure 3b we depict the query results.
4</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Conclusions</title>
      <p>In this paper we presented the tool GeoTriples that uses an extended form
of R2RML mapping language to transform geospatial data into RDF graphs,
and the GeoSPARQL ontology to properly express it. We demonstrate how
GeoTriples is being used for publishing geospatial information that resides in
di erent data sources for the realization of a precision farming application.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>C.</given-names>
            <surname>Bizer</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Seaborne</surname>
          </string-name>
          .
          <article-title>D2RQ-treating non-RDF databases as virtual RDF graphs</article-title>
          .
          <source>In Proceedings of the 3rd International Semantic Web Conference</source>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>K.</given-names>
            <surname>Kostis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Ioannis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Dimitrianos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Stefan</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Manolis</surname>
          </string-name>
          .
          <article-title>Data models and languages for mapping EO data to RDF</article-title>
          .
          <source>Del. 2</source>
          .1,
          <string-name>
            <surname>FP7 project</surname>
            <given-names>LEO</given-names>
          </string-name>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>K.</given-names>
            <surname>Kyzirakos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Karpathiotakis</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Koubarakis</surname>
          </string-name>
          .
          <article-title>Strabon: A Semantic Geospatial DBMS</article-title>
          . In International Semantic Web Conference,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>