Created
August 3, 2016 09:21
-
-
Save lcriadof/c8f388745c0f8ea4fb7108351ef91b3b to your computer and use it in GitHub Desktop.
Validaciones OK de tarjetas sin contactos en un rango temporal, asociado a sus coordenadas cuando existe el dato
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX dpay: <http://datos.crtm.es/recurso/transporte/validacion/dpaypoint/> | |
PREFIX gsp: <http://www.opengis.net/ont/geosparql#> | |
PREFIX ttp: <http://vocab.linkeddata.es/datosabiertos/def/transporte/tarjeta-transporte-publico#> | |
PREFIX validacionInstancia: <http://crtm.linkeddata.es/recurso/transporte/validacion/> | |
PREFIX ssn: <http://purl.oclc.org/NET/ssnx/ssn> | |
SELECT DISTINCT ?hashTarjeta ?title ?perfil ?FechaYhora ?dPayPoint ?coordenadas | |
FROM NAMED <http://crtm.linkeddata.es/graph/data/validaciones> | |
FROM NAMED <http://crtm.linkeddata.es/graph/data/dpaypoints> | |
WHERE { | |
GRAPH <http://crtm.linkeddata.es/graph/data/validaciones> { | |
?obs a ttp:Validacion . | |
?obs ssn:observationResultTime ?FechaYhora. | |
?obs ssn:observedBy ?dPayPoint . | |
?obs ssn:observationResult ?sensorOutput . | |
?obs ssn:featureOfInterest ?hashTarjeta . | |
?sensorOutput ssn:hasValue ?instanciaValidacion. | |
?instanciaValidacion ttp:titulo ?title . | |
?instanciaValidacion ttp:perfil ?perfil . | |
FILTER (?FechaYhora>= "2016-03-08"^^xsd:date && ?FechaYhora< "2016-03-10"^^xsd:date) | |
} | |
#OPTIONAL{ | |
GRAPH <http://crtm.linkeddata.es/graph/data/dpaypoints> { | |
?dPayPoint gsp:hasGeometry/gsp:asWKT ?coordenadas . | |
} | |
#} | |
} LIMIT 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Esta consulta es fácil de transformar. Si le quitamos los símbolos “#” entonces nos mostrará todo, y en el caso de que no tenga coordenadas aparecerán en blanco