Skip to content

Commit

Permalink
Resolve issue #11
Browse files Browse the repository at this point in the history
Add area of individual parts option for non-contiguous HRU
  • Loading branch information
lbross committed Oct 31, 2015
1 parent a0dd308 commit 1261869
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 197 deletions.
31 changes: 22 additions & 9 deletions src/BAGIS_ClassLibrary/Objects/EliminateProcess.vb
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,27 @@ Public Class EliminateProcess

'Which method will be used for eliminating features
Dim m_selectionMethod As String
'We are selecting by polygon area
Dim m_selectByPolyArea As Boolean
'We are selecting by hru area
Dim m_selectByHruArea As Boolean
Dim m_polyArea As Double
Dim m_polyAreaUnits As MeasurementUnit
'We are selecting by percentile
Dim m_selectByPercentile As Boolean
Dim m_areaPercent As Double
Dim m_polygonsEliminated As Long
'We are selecting by poly area
Dim m_selectByPolyArea As Boolean


' Constructor for selecting by area
Sub New(ByVal selectionMethod As String, ByVal selectByPolyArea As Boolean, ByVal polyArea As Double, _
ByVal polyAreaUnits As MeasurementUnit, ByVal polygonsEliminated As Long)
' Constructor for selecting by hru or poly area
Sub New(ByVal selectionMethod As String, ByVal selectByHruArea As Boolean, ByVal polyArea As Double, _
ByVal polyAreaUnits As MeasurementUnit, ByVal polygonsEliminated As Long, ByVal selectByPolyArea As Boolean)
m_selectionMethod = selectionMethod
m_selectByPolyArea = selectByPolyArea
m_selectByHruArea = selectByHruArea
m_polyArea = polyArea
m_polyAreaUnits = polyAreaUnits
m_polygonsEliminated = polygonsEliminated
m_selectByPolyArea = selectByPolyArea
End Sub

' Constructor for selecting by percentile
Expand Down Expand Up @@ -49,12 +53,12 @@ Public Class EliminateProcess
End Set
End Property

Property SelectByPolyArea() As Boolean
Property SelectByHruArea() As Boolean
Get
Return m_selectByPolyArea
Return m_selectByHruArea
End Get
Set(ByVal value As Boolean)
m_selectByPolyArea = value
m_selectByHruArea = value
End Set
End Property

Expand Down Expand Up @@ -127,4 +131,13 @@ Public Class EliminateProcess
End Get
End Property

Property SelectByPolyArea() As Boolean
Get
Return m_selectByPolyArea
End Get
Set(ByVal value As Boolean)
m_selectByPolyArea = value
End Set
End Property

End Class
62 changes: 31 additions & 31 deletions src/BAGIS_H/HruProcessLog/FrmHruTabLog.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/BAGIS_H/HruProcessLog/FrmHruTabLog.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
6 changes: 6 additions & 0 deletions src/BAGIS_H/HruProcessLog/FrmHruTabLog.vb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ Public Class FrmHruTabLog
TxtAppVersion.Text = aoi.ApplicationVersion
' Sort the rules by ruleId
logHru.RuleList.Sort()
'Note: To change the layout of the tabs
' 1. Display all files so that you can see the Designer.vb file
' 2. Comment out Inherits System.Windows.Forms.TabPage
' 3. Enable Inherits System.Windows.Forms.UserControl
' 4. The tab should now display as a regular user form; Make your layout changes
' 5. Reverse steps 2 and 3 before saving
For Each pRule In logHru.RuleList
If TypeOf pRule Is RasterSliceRule Then
Dim sliceTab As TabSliceRuleCtrl = New TabSliceRuleCtrl(logHru, pRule, isHruParent)
Expand Down
46 changes: 31 additions & 15 deletions src/BAGIS_H/HruProcessLog/TabEliminateCtrl.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/BAGIS_H/HruProcessLog/TabEliminateCtrl.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
Loading

0 comments on commit 1261869

Please sign in to comment.