Update pyThtoQgis.py

This commit is contained in:
Alex38Lyon
2026-08-28 15:55:01 +02:00
parent abf16530e7
commit 92269480e4
+7 -4
View File
@@ -64,7 +64,7 @@ def cutGPKG(input_gpkg_path, outlines_path, output_gpkg_path):
outlines_path (str) : polygon outline file (doit contenir _ID)
output_gpkg_path (str): output gpkg path
"""
try :
log.info(f"Clipping file : {Colors.ENDC}{safe_relpath(input_gpkg_path)}{Colors.INFO} to file : {Colors.ENDC}{safe_relpath(output_gpkg_path)}")
# -------------------------------------------------
@@ -231,6 +231,10 @@ def cutGPKG(input_gpkg_path, outlines_path, output_gpkg_path):
return
except RuntimeError as e:
log.error(f"cutGPKG, unable to validate geometry: {e}, continuing anyway.")
globalDat.errorCount += 1
#################################################################################################
def extractVertices(input_gpkg_path, output_gpkg_path):
"""
@@ -539,7 +543,6 @@ def diagnostic(file_path):
log.error(f"diagnostic, unable to validate geometry: {e}, continuing anyway.")
globalDat.errorCount += 1
#################################################################################################
def fix_geometry(geom, GetFID):
try:
@@ -658,8 +661,8 @@ def shp2gpkg(pathshp, infile, outputspath, outfile):
log.warning(f"Géométrie impossible à corriger FID")
error_count += 1
geom_type_name = geom.GetGeometryName()
geom_stats[geom_type_name] += 1
# geom_type_name = geom.GetGeometryName()
# geom_stats[geom_type_name] += 1
# création feature
out_feature = ogr.Feature(out_layer_defn)