For example, in d:Q513, the coordinate location is set to a longitude and latitude, and there is no altitude to set (in this property). However, when making MW API request, I got the following value for this property
...
"P625": [
{
"mainsnak": {
"snaktype": "value",
"property": "P625",
"hash": "72a03bd4ecbba1e7d0e0dfc2779ceccf9b2e0bcb",
"datavalue": {
"value": {
"latitude": 27.988055555556,
"longitude": 86.925277777778,
"altitude": null,
"precision": 0.00027777777777778,
"globe": "http://www.wikidata.org/entity/Q2"
},
"type": "globecoordinate"
},
"datatype": "globe-coordinate"
},
...Apparently there is an altitude field in the JSON response. I looked up source code in pywikibot, and got
class Coordinate(_WbRepresentation):
"""
Class for handling and storing Coordinates.
For now its just being used for DataSite, but
in the future we can use it for the GeoData extension.
"""
_items = ('lat', 'lon', 'entity')
@_deprecate_arg('entity', 'globe_item')
def __init__(self, lat, lon, alt=None, precision=None, globe=None,
typ='', name='', dim=None, site=None, globe_item=None):
"""
Represent a geo coordinate.
@param lat: Latitude
@type lat: float
@param lon: Longitude
@type lon: float
@param alt: Altitude? TODO FIXME <----
@param precision: precision
@type precision: floatI'm not sure what to do with this field in JSON. Can I just ignore this field in any case? Thanks.
p.s.
I'm not quite sure where I should go if I were to have some general Wikibase (API) questions. Could you please give me some guidance? Thanks :-)