kammoun
kammoun

Reputation: 23

Sparql query for wgs84 rdf

I have this RDF file and i like to make query to select the individual mark, but i can't. please can some one help me

<rdf:RDF xmlns="http://www.w3.org/2003/01/geo/wgs84_pos#"
     xml:base="http://www.w3.org/2003/01/geo/wgs84_pos"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:foaf="http://xmlns.com/foaf/0.1/"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> 

<owl:NamedIndividual rdf:about="http://www.co-ode.org/ontologies/ont.owl#mark">
        <lat rdf:datatype="&xsd;double">121231.0</lat>
        <alt rdf:datatype="&xsd;double">2131.0</alt>
</owl:NamedIndividual>

Upvotes: 2

Views: 261

Answers (1)

RobV
RobV

Reputation: 28675

The value you are trying to select has a datatype so you must include that in your query i.e.

PREFIX : <http://www.w3.org/2003/01/geo/wgs84_pos>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?x
WHERE
{
  ?x :lat "121231.0"^^xsd:double
}

Otherwise the terms do not match and nothing will be selected

Upvotes: 5

Related Questions