Аксиома падает при закрытии таблиц
Добавлено: 17 янв 2023, 11:58
Перебираю растры, открываю таблицу -> создаю слой-> создаю рамки -> рамки в другую таблицу -> закрываю таблицу. На второй, край на третьей - Аксиома падает
def spisokCreate(input_files,output_file):
schema = Schema(Attribute.string('path',254),coordsystem=CoordSystem.from_prj('CoordSys NonEarth Units "m" Bounds (-1000000, -1000000) (19000000, 19000000)'))
tableout = provider_manager.createfile(output_file,schema)
for tabfile in input_files:
tablein= provider_manager.openfile(tabfile)
ulayer = Layer.create(tablein)
if isinstance(ulayer, RasterLayer):
rect = Rectangle(ulayer.get_bounds(), cs=schema.coordsystem)
feat = Feature({'path':tabfile}, geometry=rect)
tableout.insert(feat)
tablein.close()
try:
if tableout.is_modified:
tableout.commit()
finally:
tableout.close()
И попутно - можно ли выполнить эту же задачу без создания слоев?
Спасибо.
def spisokCreate(input_files,output_file):
schema = Schema(Attribute.string('path',254),coordsystem=CoordSystem.from_prj('CoordSys NonEarth Units "m" Bounds (-1000000, -1000000) (19000000, 19000000)'))
tableout = provider_manager.createfile(output_file,schema)
for tabfile in input_files:
tablein= provider_manager.openfile(tabfile)
ulayer = Layer.create(tablein)
if isinstance(ulayer, RasterLayer):
rect = Rectangle(ulayer.get_bounds(), cs=schema.coordsystem)
feat = Feature({'path':tabfile}, geometry=rect)
tableout.insert(feat)
tablein.close()
try:
if tableout.is_modified:
tableout.commit()
finally:
tableout.close()
И попутно - можно ли выполнить эту же задачу без создания слоев?
Спасибо.