T

TriplyTraining: SPARQL

TriplyTraining-SPARQL
Created on Mar 12th, 2021
Members

Query Ordered Lists with SPARQL

Created a year ago

Overview

This article will explain how to query ordered lists in SPARQL.

How to Query: Geospatial data

Created 3 years ago

Obtain the bounding box of an arbitrary shape

prefix bif: <http://www.openlinksw.com/schemas/bif#>
prefix geo: <http://www.opengis.net/ont/geosparql#>
select ?original ("green" as ?originalColor) ?bbox {
  [ geo:asWKT ?original ].
  bind(replace(str(bif:st_get_bounding_box(?original)),
               'BOX\\((-?\\d*.\\d*)\\s(-?\\d*.\\d*),(-?\\d*.\\d*)\\s(-?\\d*.\\d*)\\)',
               'Polygon(($1 $2,$1 $4,$3 $4,$3 $2,$1 $2))') as ?bbox)
}
limit 1