Geometry problem at vector formatting step.
Hi !
I get the following error at vector formatting step (develop branch). It raised when intersection between envelope and ground truth generate not polygon geometry (line, point, etc.).
2022-07-08 14:49:38,330 - distributed.worker - INFO - formatting vector for tile : T31TGK
2022-07-08 14:49:38,331 - distributed.worker - INFO - launch intersection between tile's envelope and regions
2022-07-08 14:50:05,150 - distributed.worker - INFO - launch intersection between tile's envelopeRegion and groundTruth
Traceback (most recent call last):
File "/softs/projets/iota2/envs_modules/iota2_develop_20220412/bin/task_launcher.py", line 77, in <module>
sys.exit(main())
File "/softs/projets/iota2/envs_modules/iota2_develop_20220412/bin/task_launcher.py", line 73, in main
task_launcher(args.dill_file)
File "/softs/projets/iota2/envs_modules/iota2_develop_20220412/bin/task_launcher.py", line 61, in task_launcher
func(**f_kwargs)
File "/softs/projets/iota2/envs_modules/iota2_develop_20220412/lib/python3.9/site-packages/iota2-0.0.0-py3.9.egg/iota2/sampling/vector_formatting.py", line 786, in vector_formatting
if intersect.intersectSqlites(tile_region,
File "/softs/projets/iota2/envs_modules/iota2_develop_20220412/lib/python3.9/site-packages/iota2-0.0.0-py3.9.egg/iota2/vector_tools/spatial_operations.py", line 163, in intersectSqlites
layer_out.write({
File "/softs/projets/iota2/envs_modules/iota2_develop_20220412/lib/python3.9/site-packages/fiona/collection.py", line 367, in write
self.writerecords([record])
File "/softs/projets/iota2/envs_modules/iota2_develop_20220412/lib/python3.9/site-packages/fiona/collection.py", line 361, in writerecords
self.session.writerecs(records, self)
File "fiona/ogrext.pyx", line 1285, in fiona.ogrext.WritingSession.writerecs
fiona.errors.GeometryTypeValidationError: Record's geometry type does not match collection schema's geometry type: 'MultiLineString' != 'Polygon'
I have temporarily fixed the problem by adding a "try"... I think it could be better managed.
I love so much what you do
Your first fan ever