Skip to content

Commit

Permalink
add wkt transect line
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienPeillet committed Nov 17, 2023
1 parent b8cb53b commit 44801c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ def export(self) -> None:
layer.addExpressionField("x($geometry) ", field)
field = QgsField("lat", QVariant.Double)
layer.addExpressionField("y($geometry) ", field)
if layer.geometryType() == QgsWkbTypes.LineGeometry:
field = QgsField("wkt", QVariant.String)
layer.addExpressionField("geom_to_wkt($geometry) ", field)

if layer.name().lower() in [
SIGHTINGS_TABLE,
Expand Down

0 comments on commit 44801c2

Please sign in to comment.