
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

DELETE { ?s ?p ?val . }
INSERT { ?s ?p ?typed . }
WHERE {
  VALUES ?p {
    <http://example.org/migrants/location#latitude>
    <http://example.org/migrants/location#longitude>
  }
  ?s ?p ?val .
  FILTER(REGEX(STR(?val), "^-?\\d+\\.?\\d*$"))
  BIND(STRDT(STR(?val), xsd:float) AS ?typed)
}
