Merge pull request #164 from pierotofy/master

Added LAS file naming migration code, updated las file path
pull/170/head
Piero Toffanin 2017-04-29 08:26:35 -04:00 zatwierdzone przez GitHub
commit d7af8bd152
1 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -236,11 +236,19 @@ class Task(models.Model):
map = {
'all': 'all.zip',
'geotiff': os.path.join('odm_orthophoto', 'odm_orthophoto.tif'),
'las': os.path.join('odm_georeferencing', 'odm_georeferenced_model.ply.las'),
'las': os.path.join('odm_georeferencing', 'odm_georeferenced_model.las'),
'ply': os.path.join('odm_georeferencing', 'odm_georeferenced_model.ply'),
'csv': os.path.join('odm_georeferencing', 'odm_georeferenced_model.csv')
}
# BEGIN MIGRATION
# Temporary check for naming migration from *model.ply.las to *model.las
# This can be deleted at some point in the future
if asset == 'las' and not os.path.exists(self.assets_path(map['las'])):
logger.info("migration: using odm_georeferenced_model.ply.las instead of odm_georeferenced_model.las")
map['las'] = os.path.join('odm_georeferencing', 'odm_georeferenced_model.ply.las')
# END MIGRATION
if asset in map:
return self.assets_path(map[asset])
else: