Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "coordinate" property cannot be rendered using a geographically-specific format for sessions & events.(TheSessionDB) #148

Closed
candlecao opened this issue Aug 15, 2024 · 9 comments · May be fixed by #159
Assignees
Labels
Priority: high high priority

Comments

@candlecao
Copy link
Contributor

Such as:
Point(-34.56250000 -58.45833206)(longitude and latitude).

If we can render this, may be in the future, we can realize some query based on geographical information system.

@candlecao candlecao added the Priority: high high priority label Aug 15, 2024
@Yueqiao12Zhang Yueqiao12Zhang linked a pull request Aug 20, 2024 that will close this issue
@candlecao
Copy link
Contributor Author

We may refer to https://www.bobdc.com/blog/geosparql1/

@candlecao
Copy link
Contributor Author

ChatGPT gave this format:

@prefix ns1: <http://www.wikidata.org/prop/direct/> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .

<https://thesession.org/events/1> ns1:P625 [ 
    geo:lat "55.85637283"^^xsd:float ;
    geo:long "-4.25716591"^^xsd:float 
] .

<https://thesession.org/events/10> ns1:P625 [ 
    geo:lat "55.20029831"^^xsd:float ;
    geo:long "-6.25256252"^^xsd:float 
] .

@Yueqiao12Zhang Yueqiao12Zhang changed the title Determine if the "coordinate" property can be rendered using a geographically-specific format for sessions.(TheSessionDB) The "coordinate" property cannot be rendered using a geographically-specific format for sessions & events.(TheSessionDB) Aug 22, 2024
@candlecao
Copy link
Contributor Author

candlecao commented Aug 30, 2024

Please use this format:
such as

@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix ns1: <http://www.wikidata.org/prop/direct/> .

<https://thesession.org/events/754> ns1:P625 "POINT(54.25597000 -5.94771004)"^^geo:wktLiteral .

instead of

@prefix ns1: <http://www.wikidata.org/prop/direct/> .
@prefix wgs: <https://www.w3.org/2003/01/geo/wgs84_pos#> .
<https://thesession.org/events/754> ns1:P625 "(54.25597000 -5.94771004)"^^wgs:Point .

@Yueqiao12Zhang

@candlecao
Copy link
Contributor Author

I used regular expression in Visual Studio Code temporarily:
Find: (P625 "Point\([^)]+\)")
Replace: $1^^geo:wktLiteral

@candlecao
Copy link
Contributor Author

However, after the Find-Replace, I found more mistakes in the values of wdt:P625.
For example,

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT distinct (DATATYPE(?value) AS ?datatype)
WHERE {
  ?subject wdt:P625 ?value .
  BIND(wdt:P625 AS ?property)
}

We may talk over it. @Yueqiao12Zhang

@candlecao
Copy link
Contributor Author

candlecao commented Sep 5, 2024

image --some mistakes such as this. So I am concerned if there is something wrong with your code.

@candlecao
Copy link
Contributor Author

In our original data there are events which have no coordinate:
Screenshot 2024-09-06 at 09 41 49
@Yueqiao12Zhang

@fujinaga
Copy link
Member

fujinaga commented Sep 6, 2024

If there's no location information in the database, there's nothing we can do.

@candlecao
Copy link
Contributor Author

Eventually, we can use this format to render the coordinate info:
eg:

@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix wdt: <http://www.wikidata.org/prop/direct/> .
<https://thesession.org/events/1> wdt:P625 "POINT(55.85637283 -4.25716591)"^^geo:wktLiteral .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: high high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants