How to construct graph object #52
Answered
by
dachafra
Spothedog1
asked this question in
Q&A
-
Repost from rml-core Say I have the following CSV:
I'm trying to turn this into a geosparql compatible graph. Each row in the CSV would have to look like: ex:1
a geo:Feature ;
skos:prefLabel "feature 1" ;
geo:hasGeometry [
geo:asWKT "POLYGON(...)"^^geo:wktLiteral ;
] ; The graph would look like graph LR
A((eg:1)) -->|rdf:type| B((geo:Feature))
A -->|skos:prefLabel| C(("feature 1"))
A -->|geo:hasGeometry| D((BlankNode))
D -->|geo:asWKT| E(("POLYGON (...)"))
I'm stuck on how I would generate a blank node that points to the WKT @prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix over: <http://overturemaps.org#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix ex: <http://example.org/#> .
<feature> a rml:TriplesMap;
rml:logicalSource [
a rml:LogicalSource;
rr:sqlVersion rr:SQL2008;
];
rml:subjectMap [
rml:template "http://example.org/#{id}" ;
rml:class geo:Feature;
];
rml:predicateObjectMap [
rml:predicate skos:prefLabel ;
rml:objectMap [ rml:reference "title" ]
];
rr:predicateObjectMap [
rr:predicate geo:hasGeometry;
rr:objectMap [
#. TODO: How would this work?
# rr:parentTriplesMap <#GeometryMap>
rml:termType: rml:BlankNode
]
]
. How would I generate the triple?
|
Beta Was this translation helpful? Give feedback.
Answered by
dachafra
Jul 10, 2024
Replies: 1 comment 2 replies
-
Hi @Spothedog1
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
dachafra
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @Spothedog1
At this moment, RML does not allow BN without reference to the data. To solve this issue you will need to create a new TriplesMap and make a join between both