A QGIS plugin to export geographic vector layers as RDF triples in Turtle (.ttl) format, enabling integration with linked data ecosystems.
Part of the QGISParQL suite — see also Triple2Layer.
Layer2Triple converts QGIS vector layers (points, lines, polygons) into RDF (Resource Description Framework) data using the GeoSPARQL standard. Users can map layer attributes to ontology concepts, define namespaces and prefixes, and export the results as Turtle (.ttl) or XML files ready for ingestion into triple stores or linked data portals.
The plugin bridges GIS and Semantic Web workflows, enabling geospatial data to be published as linked open data.
.ttl) or XML formatqb:DataSet) via constant aggregationsrdflibLayer2Triple~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/%APPDATA%\QGIS\QGIS3\profiles\default\python\plugins\QGIS does not install external Python packages automatically. You must install them manually in your QGIS Python environment to avoid ModuleNotFoundError.
Open the OSGeo4W Shell as Administrator and run:
pip install rdflib
Open your terminal and run:
pip install rdflib --break-system-packages
rdflib
For a full walkthrough with screenshots, see the documentation.
@prefix obs: <https://purl.org/dbcells/observation#> .
@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix dbc: <https://purl.org/linked-data/dbcells#> .
obs:a1b2c3d4 a qb:Observation ;
dbc:resolution 8.3e-02 ;
geo:asWKT "Polygon ((-34.83 -6.92, ...))" .
Triple2Layer — the companion plugin that imports SPARQL query results from triple stores back into QGIS as vector layers.
Universidade Federal do Maranhão (UFMA) — LambdaGeo Research Group
If you use this plugin in your research, please cite:
@software{costa2024layer2triple,
author = {Costa, Sérgio Souza and Junior, Nerval},
title = {Layer2Triple: A QGIS Plugin for Exporting Geographic Data as RDF Triples},
year = {2024},
url = {https://github.com/LambdaGeo/qgisparql-layer2triple}
}
This project is licensed under the GNU General Public License v2.0 — see the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request.