We need to set the dim parameter for coordinates on Wikibase items that we add to ParserOutput for GeoData.
See T115481 for type parameter.
We need to set the dim parameter for coordinates on Wikibase items that we add to ParserOutput for GeoData.
See T115481 for type parameter.
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Declined | None | T115480 [Task] Set dim parameter for GeoData coordinates in Wikibase | |||
| Declined | None | T117542 find out from requests logs how type or dim from GeoData api are used |
commented more about dim on T115481#1727575 (since it's inherently related to type) and to keep discussion in one place
What exactly is dim? Am I guessing correctly that it's the approximate diameter in meters?
What are the intended use cases for dim? What is currently using dim?
One easy way to derive the dimension would be the square root of the area.
Some geographic objects, like rivers, have a length. We can also use that as the dimension.
But it feels bad to hardcode this into wikibase. Perhaps it could be done by a bot, but that would require us to put an explicit "size" property on items. Also not very nice.
There is also coordinate of west,east,north,southernmost point which can be used to infer the dimension.
https://www.mediawiki.org/wiki/Extension:GeoData#Glossary says:
dim - approximate size of an object. Used by GeoData to restrict search and by Geohack for determining appropriate map zoom. The default unit of measurement is metres, although the km suffix may be appended to indicate kilometres.
Also for the parser function:
scale: Scale of map display for this object, e.g. scale of 300 is 1:300. Gets converted into dim internally using formula dim = scale / 10. If both scale and dim are set, dim has precedence.
However the above mention of Geohack is put into perspective by:
So GeoHack seems to use the same types as GeoData, but not any data from it.
The sql based search of GeoData did not look at dim at all when I looked at those queries. Maybe the Elasticsearch implementation does.
So the following still needs to be answered.
That shows that there is a way to filter on it via API. To understand what is appropriate here we need to understand how it is currently used for user facing features, user stories so to say. We know that on wikidata.org nothing is currently using it as it as the extension is disabled. Is anything on e.g. en.wikipedia.org currently using dim from GeoData? Would anything on a client wiki that gets coordinates exclusively from wikidata.org through connected pages use dim for anything?
think this should be done soon, but wasn't a blocker for initial deployment of Special:Nearby
I see value in the use case of dim, however I'm concerned that only having this as derived information in the GeoData API, would leave RDF and Wikibase JSON based tools with less access to this.
Coordinates on Wikidata do not have a dimension, but a precision. Clients are free to derive a dimension from this precision if they need to. But in general we can not literally know the dimension of the object described by some coordinates. We don't even know the object the coordinates describe.