From e39f10ded501238a441adb7c2cb08c4644e84c09 Mon Sep 17 00:00:00 2001 From: Juho Ervasti Date: Fri, 1 Nov 2024 10:29:44 +0200 Subject: [PATCH] Set crs to new line layer --- fvh3t/core/trajectory_layer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fvh3t/core/trajectory_layer.py b/fvh3t/core/trajectory_layer.py index 19358d2..9f53283 100644 --- a/fvh3t/core/trajectory_layer.py +++ b/fvh3t/core/trajectory_layer.py @@ -176,8 +176,8 @@ def create_trajectories(self) -> None: self.__trajectories = tuple(trajectories) def as_line_layer(self) -> QgsVectorLayer | None: - # TODO: can this be a memory layer? - line_layer = QgsVectorLayer("LineString?crs=3067", "Line Layer", "memory") + line_layer = QgsVectorLayer("LineString", "Line Layer", "memory") + line_layer.setCrs(self.__layer.crs()) line_layer.startEditing()