Closed ktk closed 7 years ago
Support for schema:GeoCoordinates would make sense too
The nice thing about WKT is 1) that YASR can easily detect (using the datatype) whether a value can be rendered on a map, and 2) it requires zero tweaking by the user (other than the ...Label
and ...Color
options) because of 1).
If we'd support lat/lng props, we can't rely on datatypes anymore. So we'd have to require the user follow certain guidelines in their projection variables, e.g. using <bindingName>Lat
and <bindingName>Lng
.
Technically not difficult at all. But this is something that we'd have to explain to the user (I wouldnt want this to be an 'easter-egg' feature), without sacrificing the UX.
So, I'm hesitant to implement this. And as you said, there are workaround for the sparql-savy among us
A few days after I posted this I came to a similar conclusion. In a SELECT result set there is no hint about where the data came from so it's not possible to catch that easily.
I would say we close that for the moment, thanks anyway!
... there are workaround for the sparql-savy among us
And what would be the trick here for non-sparql-savy?
Something like this should work.
SELECT (STRDT(CONCAT('POINT(', ?lng, ' ', ?lat, ')'), 'http://www.opengis.net/ont/geosparql#wktLiteral') as ?wkt) WHERE {
?s geo:lat ?lat .
?s geo:long ?lng .
} LIMIT 1
also see http://yasgui.org/short/Syc2s2voW
OK many thanks for the hint. This seems also to work.
http://yasgui.org/short/ryyVR3DiW
But your query is far nicer
I noticed that currently geo information has to be WKT. I have many datasets where I only have WGS84 lat/long in it. I can always bind it to a WKT value but it would be nice to have this shown as points on the map directly. I've seen it both with string data types and floats.