KnowWhereGraph / geoenrichment-qgis

The QGIS plug-in implementation of the Geoenrichment toolbox
Apache License 2.0
0 stars 2 forks source link

New feature type queries for tool redesign #4

Closed fritosxii closed 2 years ago

fritosxii commented 3 years ago

Since we now need to populate the feature types, and the common/inverse properties lists before the area of interest polygon is created, here are the new queries to get those feature types and properties.

Feature type list: "select distinct ?entityType ?entityTypeLabel where { ?entity rdf:type ?entityType . ?entity geo:hasGeometry ?aGeom . ?entityType rdfs:label ?entityTypeLabel }"

NOTE: For the following properties, the variable feature below, is the value chosen from the feature type list above

Common properties: "select distinct ?p ?plabel where { ?s ?p ?o. ?s rdf:type " + feature + ". OPTIONAL {?p rdfs:label ?plabel .} }"

Sosa OBS properties: "select distinct ?p ?plabel where { ?s sosa:isFeatureOfInterestOf ?obscol . ?obscol sosa:hasMember ?obs. ?obs sosa:observedProperty ?p . ?s rdf:type " + feature + ". OPTIONAL {?p rdfs:label ?plabel .} }"

Inverse common properties: "select distinct ?p ?plabel where { ?s owl:sameAs ?wikidataSub. ?s ?p ?o. ?wikidataSub rdf:type " + feature + ". OPTIONAL {?p rdfs:label ?plabel .} }"

Let @seilagonzalez or I know if you have any questions!

rushirajnenuji commented 2 years ago

old queries, original queries are https://github.com/KnowWhereGraph/kwg-arcgis-addin-geoenrichment/issues/21 and https://github.com/KnowWhereGraph/kwg-arcgis-addin-geoenrichment/issues/22