Dear Olaf,
I would never use SPARQL for a data manipulation like you desire. Up to the best of my knowledge, SPARQL (even not GeoSPARQL) is not even capable of fulfilling your needs. Simply because it can't return both a table of results (which you probably need as you query for multiple properties) and a single result (which would the connection of the points be). Export your ordered results into some table or JSON file and post-process it with some other tool/language. That is the best advice I can give you at the moment.
Yet the simple requirement and the fact that no one was able to answer your question within 1 day has driven my attention. So I experimented and I think that something like the following query should give you the journey you seek (connection of points in given order). Why it refuses to render as a map, I don't honestly know, but might be because the result itself is a string. But of course, by this approach you loose all the interesting information about the points/events. You *only *get the journey.
SELECT (concat("LINESTRING(",group_concat(?coor;separator=", "),")") AS ?journey) WITH { SELECT DISTINCT ?coordinates WHERE { ?person wdt:P2 wd:Q9; wdt:P106 ?dob. FILTER(("1700-01-01"^^xsd:dateTime <= ?dob) && (?dob < "1720-01-01"^^xsd:dateTime)) SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } ?person wdt:P47 ?Localisation. ?Localisation wdt:P48 ?coordinates . FILTER BOUND(?coordinates). } ORDER BY DESC(?dob) } AS %q WHERE { INCLUDE %q BIND((STRLEN(?coordinates)-7) AS ?len) . BIND(SUBSTR(?coordinates,7,?len) AS ?coor). }
Best regards Jan
On Wed, 26 Jan 2022 at 13:55, Olaf Simons olaf.simons@pierre-marteau.com wrote:
Dear all,
a colleague has put data on FactGrid on a group of people travelling though early 18th-century Europe. I wonder how I could connect the geographic coordinates in their chronological order.
This is the table that has the order
could somone show me how I connect the dots?
much obliged, Olaf
Dr. Olaf Simons Forschungszentrum Gotha der Universität Erfurt Am Schlossberg 2 99867 Gotha Büro: +49-361-737-1722 Mobil: +49-179-5196880 Privat: Hauptmarkt 17b/ 99867 Gotha _______________________________________________ Wikidata mailing list -- wikidata@lists.wikimedia.org To unsubscribe send an email to wikidata-leave@lists.wikimedia.org