fixed tile info path

parent f11c56d9
......@@ -291,13 +291,20 @@ def mergedTiles(request, purchase_id, date, z, x, y):
def tileinfo(request):
if request.is_ajax():
req = dict(request.POST)
absolute_path = USERS_PATH + request.user.email + '/' + req['purchase_id'][0] + '/out'
resource_path = '/' + req['report'][0] + '/tiles' + '/' + req['date'][0] + '_TCI_60m/tilemapresource.xml'
resource_path = USERS_PATH + request.user.email + '/' + req['purchase_id'][0] + '/out'
if not os.path.exists(absolute_path + resource_path):
if req['report'][0]:
resource_path += '/' + req['report'][0] + '/tiles/'
else:
resource_path += '/mask/TCI/tiles/'
resource_path += req['date'][0] + '_TCI_60m/tilemapresource.xml'
if not os.path.exists(resource_path):
raise Http404
tree = ET.parse(absolute_path + resource_path)
tree = ET.parse(resource_path)
bounding_box = tree.find('BoundingBox')
sets = [set.get('order') for set in tree.findall('TileSets/TileSet')]
origin = tree.find('Origin')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment