Update pyThtoQgis.py

This commit is contained in:
Alex38Lyon
2026-08-28 15:47:45 +02:00
parent 46a5690a84
commit de5f72e006
+9 -3
View File
@@ -242,6 +242,7 @@ def extractVertices(input_gpkg_path, output_gpkg_path):
- Ajoute un attribut 'angle' correspondant à la direction locale de la ligne (en degrés)
- Si le fichier de sortie existe, les points sont ajoutés à la fin
"""
try :
log.info(f"Extract vertices from : {Colors.ENDC}{input_gpkg_path}{Colors.INFO} to {Colors.ENDC}{output_gpkg_path}")
@@ -420,6 +421,10 @@ def extractVertices(input_gpkg_path, output_gpkg_path):
return
except RuntimeError as e:
log.error(f"extractVertices, unable to validate geometry: {e}, continuing anyway.")
globalDat.errorCount += 1
#################################################################################################
def diagnostic(file_path):
try:
@@ -531,17 +536,18 @@ def diagnostic(file_path):
return invalid
except RuntimeError as e:
log.warning(f"Unable to validate geometry: {e}, Continuing anyway.")
log.error(f"diagnostic, unable to validate geometry: {e}, continuing anyway.")
globalDat.errorCount += 1
#################################################################################################
def fix_geometry(geom, GetFID):
try:
if geom is None:
return None
geom = geom.Clone()
try:
geom.CloseRings() # ferme anneaux
# geom = geom.RemoveDuplicatePoints() # supprime points dupliqués