PhieuLang

sparql

May 4th, 2015
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. import rdflib.graph as g
  2. graph = g.Graph()
  3. graph.parse('New_York.n3', format='n3')
  4. results = graph.query("""
  5. PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
  6. SELECT ?x ?lat ?long WHERE {
  7. ?x geo:lat ?lat; geo:long ?long .
  8. }
  9. """)
Advertisement
Add Comment
Please, Sign In to add comment