Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.6%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: whausen
  • License: apache-2.0
  • Language: JavaScript
  • Default Branch: master
  • Size: 76.4 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 15
  • Releases: 0
Created about 2 years ago · Last pushed 7 months ago
Metadata Files
Readme License Code of conduct Citation

README.md

semanticwfs

Semantic WFS with a Linked Data Backend

This project is a Java wrapper connecting to a triple store and exposing results of SPARQL queries including a geometry literal as a WFS geospatial webservice.

The project maps FeatureTypes to SPARQL queries and allows the configuration of said SPARQL queries in a webinterface.

This webservice supports the following WFS types:

  • WFS 1.0, 1.1.0 and 2.0
  • OGC API Features Core, OGC API Features CRS and OGC API Features CQL partly

SemanticWFS Infrastructure

Getting started

Currently, there are two ways to deploy the SemanticWFS service.

Installation using Docker

To deploy the SemanticWFS using Docker, you can follow these steps:

  • Clone the repository
  • Modify the triplestoreconf.json and wfsconf.json according to your needs
  • Build the application war file using Maven
  • Build the Docker image
  • Deploy the Docker image

A Gitlab CI workflow is included in this repository.

Installation as a web application using Tomcat

To deploy the SemanticWFS as a web application in Apache Tomcat, you can follow these steps:

  • Build the application using Maven
  • Copy and/or modify the following configuration files into the Tomcat root folder:
    • htmltemplate.txt
    • htmltemplate2.txt
    • htmlcovtemplate.txt
    • triplestoreconf.json
    • wfsconf.json
  • Copy the resulting .war file into the Tomcat webapps directory

A machine readable version of this installation process is documented in the included Dockerfile.

Supported literal types

The SemanticWFS currently supports reading the following literal types found in RDF graphs:

  • OGC WKTLiterals as defined in the GeoSPARQL standard
  • OGC GMLLiterals as defined in the GeoSPARQL standard
  • GeoJSON literals
  • Well-Known-Binary literals

Export formats

The SemanticWFS currently supports the following formats for export:

Adding Triple Stores

Triple stores can be added to the SemanticWFS using the triplestoreconf.json file. The file needs a SPARQL endpoint address, and certain configurations:

{
  "name":"Triple Store Configuration",
  "prefixes":{
    "http://www.adv-online.de/namespaces/adv/gid/6.0#":"aaa6",
    "http://www.opengis.net/gml/3.2#":"gml",
    "http://www.wikidata.org/entity/":"wd"
   },
    "endpoints":{
      "https://query.wikidata.org/sparql":{
        "endpoint":"https://query.wikidata.org/sparql","epsg":4326, 
        "name":"Wikidata",
        "type":"http://www.wikidata.org/prop/direct/P31",
        "geo":["http://www.wikidata.org/prop/direct/P625"],
        "label":"http://www.w3.org/2000/01/rdf-schema#label",
        "bboxlimit":500
      }
    }
  }
}

A triple store needs a queryable SPARQL endpoint address and a designation (name) to identify it in the SemanticWFS configuration. In addition, several property names need to be given to the SemanticWFS in order to create correctly formatted queries: * type-Property: The property depicting the relation rdf:type in the respective triplestore * geo-Property: A list of properties depicting geometry literals in the respective triplestore * label-Property: A property which represents the property used for labels

Finally, a limit for boundingbox queries may be defined. A bounding box query is sent on initialization to get bounding boxes for the respective feature collections defined for the triple store.

Adding Collections

Once a triple store has been configured in the SemanticWFS implementation, a OGC API Feature Collection may be defined from a SPARQL query and a CRS definition. These collections are stored in the wfsconf.json configuration file.

{
  "baseurl":"https://www.i3mainz.de/projekte/bkg/semanticwfs",
  "servicetitle":"BKG WFS Service",
  "servicedescription":"Testwebservice with a Triple Store backend",
  "datasets":[
    {
      "namespace":"http://www.wikidata.org/entity/",
      "indvar":"item",
      "useorderby":true,
      "description":"Cities in Wikidata",
      "geometrytype":"Point",
      "targetCRS":"EPSG:4326",
      "class":"http://www.wikidata.org/entity/Q515",
      "query":"SELECT ?item ?itemLabel ?the_geom WHERE{ ?item wdt:P31 wd:Q515 . ?item wdt:P625 ?the_geom . SERVICE wikibase:label { bd:serviceParam wikibase:language '[AUTO_LANGUAGE],en'. } }",
      "triplestore":"https://query.wikidata.org/sparql",
      "type":"WFS",
      "name":"WikidataCity"
    }
  ]
}

The wfsconf includes as baseurl which configures the URL under which the SemanticWFS will be hosted, the name of the webservice and a servicedescription. To add a new feature collection, the datasets array needs to be extended with a JSON object formatted as follows: * name: The name of the FeatureCollection as it should appear in the SemanticWFS interface * description: A short description of the FeatureCollection to be defined * type: The type of FeatureCollection, either vector data (WFS) or raster data (WCS) * query: The SPARQL query to retrieve the FeatureCollection. The SPARQL query needs to include the variable defined in the indvar property and at least one variable ending in _geom to identify the geometry literal. * triplestore: The address of the SPARQL endpoint * indvar: The variable in the SPARQL query which retrieves instances * targetCRS: The CRS used for geometries which are queried from the triple store defined as an EPSG code * useorderby: Adds an orderBy statement to the query (may run into performance issues in certain triple stores * class: The main class to be queried. Should be the same class as defined in the SPARQL query * geometrytype: The type of geometry which is expected as a result from the SPARQL endpoint. Relevant for downlift formats which only allow to only represent one geometry type. * namespace: The namespace used for the classes which are queried

Owner

  • Login: whausen
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.1.0
message: If you use this software, please cite it as below.
authors:
  - family-names: Homburg
    given-names: Timo
title: SemanticWFS
version: 0.5
date-released: 2020-10-06

GitHub Events

Total
  • Push event: 5
  • Pull request event: 4
  • Create event: 4
Last Year
  • Push event: 5
  • Pull request event: 4
  • Create event: 4

Issues and Pull Requests

Last synced: almost 2 years ago

All Time
  • Total issues: 0
  • Total pull requests: 8
  • Average time to close issues: N/A
  • Average time to close pull requests: 8 minutes
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.25
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 8
  • Average time to close issues: N/A
  • Average time to close pull requests: 8 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.25
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • whausen (23)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/maven.yml actions
  • JamesIves/github-pages-deploy-action releases/v3 composite
  • actions/checkout v1 composite
  • actions/setup-java v1 composite
  • actions/upload-artifact v3 composite
Dockerfile docker
  • tomcat 9 build
pom.xml maven
  • org.projectlombok:lombok 1.18.4 provided
  • com.clearspring.analytics:stream 2.9.8
  • com.fasterxml.jackson.core:jackson-annotations 2.13.2
  • com.fasterxml.jackson.core:jackson-core 2.13.2
  • com.github.jferard:fastods 0.7.2
  • com.google.openlocationcode:openlocationcode 1.0.4
  • com.siemens.ct.exi:exificient 1.0.7
  • de.undercouch:bson4jackson 2.15.0
  • io.swagger.core.v3:swagger-annotations 2.2.11
  • io.swagger.core.v3:swagger-jaxrs2 2.2.11
  • io.swagger.core.v3:swagger-jaxrs2-servlet-initializer-v2 2.2.11
  • mil.nga.geopackage:geopackage 6.6.2
  • net.sf.saxon:saxon 8.7
  • net.sf.saxon:saxon-dom 8.7
  • no.ecc.vectortile:java-vector-tile 1.3.10
  • org.apache.commons:commons-compress 1.26.0
  • org.apache.httpcomponents:httpclient 4.5.13
  • org.apache.jena:jena-arq 4.7.0
  • org.apache.jena:jena-core 4.7.0
  • org.apache.poi:poi 4.1.2
  • org.apache.poi:poi-ooxml 4.1.2
  • org.apache.sis.storage:sis-storage 1.0
  • org.glassfish.jaxb:txw2 4.0.0-M4
  • org.glassfish.jersey.containers:jersey-container-servlet 2.34
  • org.glassfish.jersey.core:jersey-server 2.34
  • org.glassfish.jersey.inject:jersey-hk2 2.34
  • org.json:json 20231013
  • org.locationtech.jts.io:jts-io-common 1.19.0
  • org.locationtech.jts:jts-core 1.19.0
  • org.locationtech.proj4j:proj4j 1.1.1
  • org.rdfhdt:hdt-java-core 2.1.2
  • org.wololo:jts2geojson 0.18.1
  • uk.ac.rdg.resc:edal-coveragejson 1.5.2