Talk:Sophox

From OpenStreetMap Wiki
Jump to navigation Jump to search

osmm:key coverage

This page says every data item has an osmm:key predicate, giving bridge (Q103) as an example, but Sophox isn't returning any results for osmd:Q103 osmm:key ?key. 889 items have permanent key ID (P16) but no osmm:key:

SELECT * WHERE {
  ?subject osmdt:P16 ?key.
  FILTER NOT EXISTS {
    ?subject osmm:key [].
  }
}

Run it (edit query)

What's special about these keys? Does it have something to do with when the data items were created?

 – Minh Nguyễn 💬 10:37, 19 August 2020 (UTC)

Received fatal alert: handshake_failure

@Yurik: Hi, this federated query fails with Caused by: javax.net.ssl.SSLException: Received fatal alert: handshake_failure. It sounds like bad certificate, it would be nice if you could what the error actually is?

prefix taxmeon: <http://www.yso.fi/onto/taxmeon/>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT *
WHERE 
{
    SERVICE <https://api.finto.fi/sparql> { 
     SELECT * WHERE {
        ?scifi taxmeon:hasVernacularName <http://www.yso.fi/onto/kassu/k20487> 
     }
    }
}

Run it (edit query)

--Zache (talk) 13:30, 24 October 2020 (UTC)

Could be also just that https is not supported by server and request is downgraded to http? In any case http://api.finto.fi/sparql works --Zache (talk) 05:42, 25 October 2020 (UTC)
@Zache: is it still broken for you? Mateusz Konieczny (talk) 12:01, 26 July 2024 (UTC)

Tag usage statistics

It seem that this is possible to get usage statistics from taginfo only for keys.

Is it possible to add it also for tags ?

osmd:Q5043  osmm:count_all    54856951  # Number of objects in the OSM database with this tag.

--Pyrog (talk) 09:45, 7 November 2020 (UTC)

Broken

Resolved: Mateusz Konieczny (talk) 11:59, 26 July 2024 (UTC)

Any idea why Sophox is now rejecting

SELECT ?value ?loc
WHERE { ?osm osmt:amenity 'atm'; osmt:operator ?value; osmm:loc ?loc. }

? It used to work and become part of StreetComplete, and now it seems impossible to update tag statistics. It goes down with

java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: com.bigdata.rdf.sail.sparql.ast.VisitorException: QName 'osmt:amenity' uses an undefined prefix

@Yurik:

Mateusz Konieczny (talk) 14:11, 22 August 2021 (UTC)

I opened https://github.com/streetcomplete/StreetComplete/issues/3202 as I see no obvious solutions Mateusz Konieczny (talk) 14:23, 22 August 2021 (UTC)
Seems already known - https://github.com/Sophox/sophox/issues/27 - Sophox has only small portion of OSM data, just what was recently edited Mateusz Konieczny (talk) 15:25, 22 August 2021 (UTC)
@Mateusz Konieczny: Sophox seems to have no problem with the query above for me: I get 7,925 results in 1.798 seconds. But of course that's far short of the actual total. – Minh Nguyễn 💬 01:28, 23 August 2021 (UTC)
https://taginfo.openstreetmap.org/tags/amenity=atm reports over 180 000 atm, so Sophox no longer contains most of OSM data - making it useless at least for that purpose :( Mateusz Konieczny (talk) 07:54, 23 August 2021 (UTC)
Whatever the circumstances for the error message above, it's easy to get around. "osmt:amenity" is used simply as an abbreviation for "https://wiki.openstreetmap.org/wiki/Key:amenity" - if the prefix "osmt" is not defined, you can define it in the beginning of your query yourself:
PREFIX osmt: <https://wiki.openstreetmap.org/wiki/Key:>
--TuukkaH (talk) 08:34, 23 August 2021 (UTC)

sophox.org not accessible

@@Yurik:, Today when I tried to access https://sophox.org I got the following error.

Secure Connection Failed
An error occurred during a connection to sophox.org. Peer’s Certificate has been revoked.
Error code: SEC_ERROR_REVOKED_CERTIFICATE
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.

Hope you or someone will fix it soon.--Arjunaraoc (talk) 04:11, 11 February 2022 (UTC)

@Yurik: I have the same problem. SPARQL queries do not load. --Galopax (talk) 09:52, 17 February 2022 (UTC)
@Yurik:, Server is up, but old working queries are failing. Example: https://w.wiki/BBt ----Arjunaraoc (talk) 04:49, 18 April 2022 (UTC)
The problem appears to be specific to the query, as most of the examples on the article page are working and even the ones integrated with wikidata query service( Example queries) are working.--Arjunaraoc (talk) 00:57, 8 July 2023 (UTC)
Resolved: Mateusz Konieczny (talk) 11:58, 26 July 2024 (UTC)

Find all documentation pages with 0 uses

Does anyone know how to find all key and tag pages that have documentation but there are 0 uses in the OSM database? maro21 15:33, 3 May 2023 (UTC)

Why I would use it over Overpass API?

Is it having language that may be more familiar to some?

Or is it also allowing to make large queries (say, location data for all shops in Europe - which would fail on Overpass as too taxing)?

Mateusz Konieczny (talk) 12:02, 26 July 2024 (UTC)

My impression of reading the documentation here on OSM wiki and wikidata is that sophbox combines both wikidata data and OSM data. But it is uncertain if the data is actual, much old documentaiton on https://www.wikidata.org/wiki/Wikidata:OpenStreetMap/Tools#Sophbox which I can´t figure out whats actual true today in 2025... @Minh Nguyen do you know? HuggeK (talk) 14:08, 25 December 2025 (UTC)
@HuggeK: Sophox only directly stores OSM data and metadata about OSM tag usage, but it is capable of performing federated queries with other SPARQL endpoints, including the Wikidata Query Service. Unlike QLever, Sophox does not store Wikidata directly, so federated queries with Wikidata can take much longer or time out. At this point, the primary advantage of Sophox is that it synchronizes with OSM's minutely diffs, whereas QLever depends on the full planet updates, resulting in a delay of a couple weeks. According to the status buttons that (sometimes) appear on Sophox, it currently has OSM data as of 2025-12-27T20:51:00Z, tag usage statistics from taginfo as of 2024-01-15T00:59:42Z, Wikimedia pageview statistics as of 2024-01-10T03:00:00Z, and data items as of 2025-12-27T21:00:49Z. – Minh Nguyễn 💬 21:35, 27 December 2025 (UTC)
@Mateusz Konieczny: The primary advantages of Sophox and QLever over the Overpass API are interoperability with other large datasets and better performance with certain queries that would be grossly inefficient in OverpassQL. (Performance optimizations that work well in OverpassQL don't necessarily apply to SPARQL or vice versa.) SPARQL also has much more advanced string processing and statistical capabilities. The primary advantage of OverpassQL over SPARQL is more advanced spatial querying. Sophox only stores the centroids of ways. QLever is rapidly catching up to OverpassQL in spatial querying with its recent implementation of spatial joins in GeoSPARQL, as well as the topology support that landed early this year. Some common tasks in OverpassQL are still quite verbose in SPARQL but are becoming reasonably efficient. The main advantages of Sophox over QLever are the ability to join with data items and display results in various kinds of charts. – Minh Nguyễn 💬 21:44, 27 December 2025 (UTC)

Is the information at Important Changes still up to date?

https://wiki.openstreetmap.org/wiki/Sophox#Important%20Changes HuggeK (talk) 15:29, 25 December 2025 (UTC)

HuggeK, A better approach would be to use Qlever, as it is has better features and is also better maintained, with weekly updates. —Preceding unsigned comment added by Arjunaraoc (talkcontribs) 05:26, 26 December 2025 (UTC)
@HuggeK: Yes, Sophox hasn't replicated Wikidata for a long time, instead relying on federated queries. These days I typically use QLever for anything joining OSM and Wikidata, unless I need more up-to-date OSM data or something involving data items. – Minh Nguyễn 💬 21:47, 27 December 2025 (UTC)