Skip to content

Commit

Permalink
Add code to skip labels if LabelText is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjib committed May 7, 2024
1 parent cfa67c2 commit 0527ba1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions qgepqwat2ili/qgep/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,15 @@ def textpos_common(row, t_type, geojson_crs_def):
layer_name = label["properties"]["Layer"]
obj_id = label["properties"]["qgep_obj_id"]

print(f"label[properties]: {label['properties']}")

if not label["properties"]["LabelText"]:
logger.warning(
f"Label of object '{obj_id}' from layer '{layer_name}' is empty and will not be exported"
)
continue


if layer_name == "vw_qgep_reach":
if obj_id not in tid_for_obj_id["haltung"]:
logger.warning(f"Label for haltung `{obj_id}` exists, but that object is not part of the export")
Expand Down

0 comments on commit 0527ba1

Please sign in to comment.