mirror of
https://github.com/Alex38Lyon/Synthese-PSM_LARRA.git
synced 2026-09-30 07:21:55 +00:00
Update pyThtoQgis.py
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user