Ticket #18 (assigned enhancement)

Opened 5 years ago

Last modified 4 years ago

Visualize WKT/GML geometry in Strabon Endpoint

Reported by: charnik Owned by: pyravlos-team
Priority: minor Milestone:
Component: endpoint Version:
Keywords: visualization, WKT, GML, KML Cc:

Description

A "simple" way of doing this with what we have already is by issuing the query below.

SELECT (CONCAT("", "POLYGON ((12.30233153526084373130165438 45.45290502906729581846399530 , 12.30485100305526072837292025 45.45321458737845957505364711 , 12.30529810045014877431824531 45.45144299450935141056938339 , 12.30277863265573177724697945 45.45113343619818765397973158 , 12.30233153526084373130165438 45.45290502906729581846399530))") as ?g)

WHERE {

<http://teleios.di.uoa.gr/ontologies/noaOntology.owl#MSG2_07-08-24_00:00_DynamicThresholds_shp> ?p ?o

} LIMIT 1

The problem with this is that if there is no triple matching the triple pattern, then the result will be empty and thus the KML will be empty as well. We could override this by specifying a general triple pattern (?s ?p ?o) and a "LIMIT 1" clause, but again this has two disadvantages:
1) the query execution might be slow,
2) the result would be again the empty mapping for empty databases. Maybe it would be better to have another JavaBean? in Strabon Endpoint, produce a KML file with the requested geometry and displaying it as we currently do using Google maps.

Change History

comment:1 Changed 5 years ago by charnik

  • Owner changed from somebody to pyravlos-team
  • Status changed from new to assigned

comment:2 Changed 4 years ago by charnik

SPARQL 1.1 can test for the presence/absence of a triple using the "FILTER EXISTS"/"FILTER NOT EXISTS" construct. See the official page at http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#neg-pattern> for details.

A workaround is to use the "FILTER NOT EXISTS" construct (http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#neg-notexists) for matching a triple that we will be sure it will not be present in the underlying RDF graph (for example: it can be generated automatically at query time or be a certain triple which it will be highly unlikely to be found).

Note: See TracTickets for help on using tickets.