Skip to content

Simple geospatial web mapping SPARQL interface to a knowledge graph with GeoSPARQL geometries

License

Notifications You must be signed in to change notification settings

mduckham/kgwebmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kgwebmap: Knowledge Graph Web Map

A very simple, single file MapLibre web map to query and map data from a knowledge graph containing GeoSPARQL geometries.

kgwebmap example

SPARQL end point

The web map retrieves and displays data from a knowledge graph using queries to a SPARQL endpoint.

Apache Jena Fuseki is recommended as an easy-to-use SPARQL endpoint and triple store (graph database). Instructions for installing Fuseki and creating a knowledge graph are widely available. OSX users can install in minutes through a package manager like Homebrew, for example.

This repo also contains some more information on installing and configuring the Apache Jena Fuseki GeoSPARQL server.

SPARQL knowledge graph

An example knowledge graph containing the gazetted placenames for Australia, structured using the FSDF Placename ontology, can be downloaded from the RMIT Geographic Knowledge Lab below:

You can verify your SPARQL endpoint is working correctly by running a simple SPARQL query on the created knowledge graph, such as the one below:

PREFIX pn: <http://linked.data.gov.au/def/placenames/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#> 
SELECT  ?loc ?geom ?name ?category
WHERE   {
        ?loc geo:asWKT ?geom .
        ?place geo:hasGeometry ?loc .
        ?place pn:hasPlaceClassification ?category .
        ?place pn:hasPlaceName ?plnm .
        ?plnm pn:name ?name
}
LIMIT 100

Maplibre web map

The kgwebmap is based on an updated version of the EPFL DHLAB leaflet-sparql repo, converted to MapLibre.

About

Simple geospatial web mapping SPARQL interface to a knowledge graph with GeoSPARQL geometries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages