tile id needs to be computed from coordinates, but i am not sure how that is done.
this HERE api uses it https://smap.hereapi.com/v8/maps/attributes
in https://developer.here.com/documentation/content-map-attributes/dev_guide/topics/here-map-content.html
their docs mention
tile size = 180° / 2^level [degree]
tileY = trunc((latitude + 90°) / tile size)
tileX = trunc((longitude + 180°) / tile size)
tileID = tileY * 2 * (2^level) + tileX
but i'd like to get a python working example:
import math
def get_tile_id(lat, long, level=8):
latitude = math.degrees(lat)
longitude = math.degrees(long)
denom = math.degrees(math.pow(2, level))
tile_size = math.degrees(180) / denom
tileY = math.trunc(
(latitude + math.degrees(90)) / tile_size
)
tileX = math.trunc(
(longitude + math.degrees(180)) / tile_size
)
tile_id = tileY * 2 * math.pow(2, level) + tileX
return tile_id