I'm trying to convert the following Turtle RDF into csv. I just want to keep the values of hasPlaceName
, hasICAOcode
and hasWKT
for each object:
:Place_Oberschleissheim_Airport a :Civil_Aerodrome
; :hasPlaceName "OBERSCHLEISSHEIM"
; :hasICAOcode "EDNX"
; :elevationOfPlace "487.68"^^unit:meters
; :hasGeometry :geom_11_55916690826416_48_239166259765625
; :Aerodrome_serves_City :City_OBERSCHLEISSHEIM
. :City_OBERSCHLEISSHEIM a :City
. :geom_11_55916690826416_48_239166259765625 a :Geometry
; :hasWKT "POINT (11.55916690826416 48.239166259765625)" .
:Place_Oberschleissheim_Airport a :Civil_Aerodrome
; :hasPlaceName "OBERSCHLEISSHEIM"
; :hasICAOcode "EDMX"
; :elevationOfPlace "487.68"^^unit:meters
; :hasGeometry :geom_11_565555572509766_48_23805618286133
; :Aerodrome_serves_City :City_OBERSCHLEISSHEIM
. :City_OBERSCHLEISSHEIM a :City
. :geom_11_565555572509766_48_23805618286133 a :Geometry
; :hasWKT "POINT (11.565555572509766 48.23805618286133)" .
This is my SPARQL query:
SELECT DISTINCT ?icao ?name ?wkt
WHERE {
[] a :Civil_Aerodrome ;
:hasPlaceName ?name ;
:hasICAOcode ?icao ;
:hasGeometry/:hasWKT ?wkt .
}
But I'm getting four records instead of two:
(u'EDNX', 'u'OBERSCHLEISSHEIM', 'u'POINT (11.565555572509766 48.23805618286133)')
(u'EDMX', 'u'OBERSCHLEISSHEIM', 'u'POINT (11.565555572509766 48.23805618286133)')
(u'EDNX', 'u'OBERSCHLEISSHEIM', 'u'POINT (11.55916690826416 48.239166259765625)')
(u'EDMX', 'u'OBERSCHLEISSHEIM', 'u'POINT (11.55916690826416 48.239166259765625)')
I think I'm missing something in the SPARQL syntax. Any clues towards the right direction would be greatly appreciated.