Visualize geospatially linked data¶
What’s in this document?
When a SPARQL query returns data that contains geometries, you can explore the results of the query visually using the Geo tab in the GraphDB Workbench. The Geo tab visualizes data using OpenStreetMaps and OpenTopoMap and can render results as points, lines, or polygons. The results can be styled through the SPARQL query itself using custom SPARQL properties.
Activation criteria¶
The Geo tab is only accessible if a SPARQL query returns geospatial data which contains a value with any of the following datatypes:
http://www.opengis.net/ont/geosparql#wktLiteralhttp://www.openlinksw.com/schemas/virtrdf#Geometryhttp://www.opengis.net/ont/geosparql#geoJSONLiteralhttp://www.opengis.net/ont/geosparql#gmlLiteralhttp://www.opengis.net/ont/geosparql#kmlLiteralhttp://www.opengis.net/ont/geosparql#dggsLiteralhttp://www.opengis.net/ont/geosparql#geoCodeLiteral
When activated, the plugin iterates over all SPARQL result bindings, identifies geometries (points, line or polygons) and re-renders them using Leaflet.
Styling and interaction properties¶
You can control the styling and behavior of the rendered elements via special SPARQL binding variables. These variables begin with geo_ and control the color, opacity, and interactions with the different rendered elements. Some of the variables affect each geometry in a different way.
Note
By default, clicking on a rendered geometry, a popup opens with all properties bound to that geometry.
SPARQL binding variable |
Effect on rendered result, separated by geometry |
||
|---|---|---|---|
Point |
Line |
Polygon |
|
|
If the result has |
||
|
If the result has |
||
|
Defines the color of the point,
unless |
Defines the color of the line or the border of the polygon. Accepts hex values and all default HTML colors. |
|
|
Controls opacity of the point.
Accepts values from 0 to 1, where
|
Controls the opacity of the line or the border of the polygon. Accepts
values from 0 to 1, where |
|
|
N/A |
Controls the stroke width of the line or the border of the polygon. |
|
|
N/A |
N/A |
Defines the fill color for the polygon. Accepts hex values and all default HTML colors. |
|
N/A |
N/A |
Defines the fill opacity for the
polygon. Accepts values from 0 to
1, where |
|
Changes the visualization of a
point with an icon from the
Remix
icon set. Accepts Remix Icon
classes. Can be used together
with |
N/A |
N/A |
|
Changes the visualization of a
point with a custom icon. Accepts
the URL address of the custom
icon. Supported file formats
are |
N/A |
N/A |