Skip to content

Commit

Permalink
New tool: Clip raster by polygon
Browse files Browse the repository at this point in the history
  • Loading branch information
pathmapper committed Apr 10, 2024
1 parent 8ec2a09 commit 0aa87f1
Show file tree
Hide file tree
Showing 4 changed files with 311 additions and 86 deletions.
3 changes: 3 additions & 0 deletions xplan_umring.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def saveTool(tool):
self.dlg.rb_fp_60.toggled.connect(lambda: saveTool("flaechennutzungsplan60"))
self.dlg.rb_lp_60.toggled.connect(lambda: saveTool("landschaftsplan60"))
self.dlg.rb_replace.toggled.connect(lambda: saveTool("replacegeometry"))
self.dlg.rb_clip.toggled.connect(lambda: saveTool("clipraster"))

if self.selectedTool == "bebauungsplan54":
self.dlg.rb_bp_54.setChecked(True)
Expand All @@ -194,6 +195,8 @@ def saveTool(tool):
self.dlg.rb_lp_60.setChecked(True)
elif self.selectedTool == "replacegeometry":
self.dlg.rb_replace.setChecked(True)
elif self.selectedTool == "clipraster":
self.dlg.rb_clip.setChecked(True)

result = self.dlg.exec_()

Expand Down
197 changes: 111 additions & 86 deletions xplan_umring.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>651</width>
<height>455</height>
<height>538</height>
</rect>
</property>
<property name="focusPolicy">
Expand All @@ -17,89 +17,98 @@
<string>XPlan-Umring</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="10" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
<item row="9" column="0">
<widget class="QRadioButton" name="rb_bp_60">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
<property name="text">
<string>v6.0</string>
</property>
</spacer>
</widget>
</item>
<item row="16" column="0">
<widget class="QRadioButton" name="rb_lp_60">
<item row="1" column="0">
<widget class="QComboBox" name="cb_ags">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>v6.0</string>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
</widget>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer_6">
<item row="20" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QLabel" name="addressLabel">
<item row="23" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="18" column="0">
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Bitte gewünschtes Umring-Werkzeug auswählen:</string>
<string>Hilfswerkzeuge</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_2">
<item row="12" column="0">
<widget class="QRadioButton" name="rb_fp_60">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Bebauungsplan</string>
<string>v6.0</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QComboBox" name="cb_ags">
<item row="19" column="0">
<widget class="QRadioButton" name="rb_replace">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
<property name="text">
<string>Geltungsbereich Umringszenario ersetzen (Geometrie-Update)</string>
</property>
</widget>
</item>
<item row="21" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="16" column="0">
<widget class="QRadioButton" name="rb_lp_60">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<property name="text">
<string>v6.0</string>
</property>
</widget>
</item>
Expand All @@ -115,69 +124,58 @@
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QRadioButton" name="rb_bp_60">
<item row="21" column="0">
<widget class="QRadioButton" name="rb_clip">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>v6.0</string>
<string>Rasterplan mit Polygon zuschneiden</string>
</property>
</widget>
</item>
<item row="17" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="0">
<widget class="QRadioButton" name="rb_bp_54">
<item row="3" column="0">
<widget class="QLabel" name="addressLabel">
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>v5.4</string>
<string>Bitte gewünschtes Umring-Werkzeug auswählen:</string>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="label">
<item row="8" column="0">
<widget class="QRadioButton" name="rb_bp_54">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Landschaftsplan</string>
<string>v5.4</string>
</property>
</widget>
</item>
<item row="18" column="0">
<widget class="QLabel" name="label_3">
<item row="6" column="0">
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Hilfswerkzeug</string>
<string>Bebauungsplan</string>
</property>
</widget>
</item>
<item row="20" column="0">
<spacer name="verticalSpacer_4">
<item row="4" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
Expand All @@ -189,41 +187,43 @@
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
<item row="10" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="text">
<string>Kommune für Voreinstellungen auswählen oder selbst eintragen (optional):</string>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</widget>
</spacer>
</item>
<item row="19" column="0">
<widget class="QRadioButton" name="rb_replace">
<item row="14" column="0">
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Geltungsbereich Umringszenario ersetzen (Geometrie-Update)</string>
<string>Landschaftsplan</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QRadioButton" name="rb_fp_60">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
<item row="2" column="0">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="text">
<string>v6.0</string>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</widget>
</spacer>
</item>
<item row="13" column="0">
<spacer name="verticalSpacer_5">
Expand All @@ -238,8 +238,8 @@
</property>
</spacer>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer_3">
<item row="17" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
Expand All @@ -251,6 +251,31 @@
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Kommune für Voreinstellungen auswählen oder selbst eintragen (optional):</string>
</property>
</widget>
</item>
<item row="22" column="0">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
Expand Down
Loading

0 comments on commit 0aa87f1

Please sign in to comment.