archaeodav / felttegn

Public repository for FeltTegn, a Qgis Plugin for processing survey data from archaeological excavations conducted by Danish Museums
GNU General Public License v3.0
5 stars 1 forks source link

Inconsistent feature annotation crashes validator #26

Closed archaeodav closed 2 years ago

archaeodav commented 3 years ago

Error crashes felttegn under geometry validation. Caused by incosistent annotation returining a poly with empty geometry.

Example:

565131.977,6241668.218,63.798,1696,-ANLG A71
565129.353,6241669.133,63.834,1697,-ANLG A71.sortmuldetsand
565125.409,6241689.159,63.719,1698,-ANLG A71.sortmuldetsand
565127.582,6241689.875,63.491,1699,-ANLG A71.sortmuldetsand

image

2021-10-29T10:46:44     WARNING    Traceback (most recent call last):
              File "C:\Users/au526889/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\felt_tegn\felt_tegn.py", line 266, in run
              digit = Digi([i],kote_file=kote_file)
              File "C:\Users/au526889/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\felt_tegn\felt_tegn.py", line 672, in __init__
              self.feature_builder()
              File "C:\Users/au526889/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\felt_tegn\felt_tegn.py", line 741, in feature_builder
              self.validator(l)
              File "C:\Users/au526889/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\felt_tegn\felt_tegn.py", line 820, in validator
              errors = self.layers[layer]['features'][feat]["geom"].validateGeometry()
             AttributeError: 'NoneType' object has no attribute 'validateGeometry'
archaeodav commented 3 years ago

image

Fixed by adding a function to buffer a polygon with only one point so that it shows up in the Anlæg_Fejl layer as a duplicate

Still to do is ensure that such features are added to the fejl layer by default

archaeodav commented 2 years ago

Fixed in upcoming release 1.01