Skip to content

Commit

Permalink
Continue work on issue #21
Browse files Browse the repository at this point in the history
  • Loading branch information
lbross committed Nov 11, 2015
1 parent c5bb097 commit 4cf4eb3
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 15 deletions.
7 changes: 5 additions & 2 deletions src/BAGIS_ClassLibrary/ConstantsModule.vb
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,20 @@
Public Const BA_Invalid_Data As String = "Invalid"
Public Const BA_Valid_Data As String = ""

'Constant layer names for BAGIS-P JH_Coeff calculation
'Constant layer names for jh_coeff data
Public Const BA_JH_Coef_Aug_Tmax As String = "JH_Coef_Aug_Tmax"
Public Const BA_JH_Coef_Aug_Tmin As String = "JH_Coef_Aug_Tmin"
Public Const BA_JH_Coef_Jul_Tmax As String = "JH_Coef_Jul_Tmax"
Public Const BA_JH_Coef_Jul_Tmin As String = "JH_Coef_Jul_Tmin"

'Constant parameter names for parameters calculated at the AOI-level
Public Const BA_Aoi_Parameter_JH_Coef As String = "Aoi_Parameter_JH_Coef"
Public Const BA_Aoi_Parameter_SR_Obs As String = "SR_Obs"
Public Const BA_Aoi_Parameter_PE_Obs As String = "PE_Obs"

'Constant prefix for BAGIS warning messages from GP
Public Const BA_Warning_Message_Prefix As String = "BAGIS Message:"
Public Const BA_Warning_Message_Prefix As String = "BAGIS Message"

End Module


Expand Down
12 changes: 10 additions & 2 deletions src/BAGIS_ClassLibrary/PublicModule.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2233,7 +2233,7 @@ Optional ByVal hasPaddingBackSlach As Boolean = False) As String
End Function

' Verify that the vector dataset uses the same datum as the datum stored in the hruExtension
Public Function BA_VectorProjectionMatch(ByVal inputPath1 As String, ByVal inputPath2 As String) As Boolean
Public Function BA_VectorProjectionMatch(ByVal inputPath1 As String, ByVal inputPath2 As String, ByRef aoiProjection As String) As Boolean
Dim pGeoDataset As IGeoDataset = Nothing
Dim pGeoDataset2 As IGeoDataset = Nothing
Dim spRef1 As ISpatialReference = Nothing
Expand Down Expand Up @@ -2261,11 +2261,19 @@ Optional ByVal hasPaddingBackSlach As Boolean = False) As String
End If
If pGeoDataset2 IsNot Nothing Then
spRef2 = pGeoDataset2.SpatialReference
'Spatial reference for the dataset in question
'Check datums first
Dim datumStr1 As String = BA_DatumString(spRef1)
Dim datumStr2 As String = BA_DatumString(spRef2)
If (String.Compare(datumStr1, datumStr2) <> 0) Then
aoiProjection = datumStr2
Return False
End If
'Check projections if we passed the first test
If TypeOf spRef1 Is IProjectedCoordinateSystem Then
Dim proj1 As IProjectedCoordinateSystem = CType(spRef1, IProjectedCoordinateSystem)
Dim proj2 As IProjectedCoordinateSystem = TryCast(spRef2, IProjectedCoordinateSystem)
If proj2 IsNot Nothing Then
aoiProjection = proj2.Name
Return proj1.FactoryCode.Equals(proj2.FactoryCode)
End If
ElseIf TypeOf spRef1 Is IGeographicCoordinateSystem Then
Expand Down
116 changes: 112 additions & 4 deletions src/BAGIS_P/Forms/FrmPEandSRObs.Designer.vb

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

Loading

0 comments on commit 4cf4eb3

Please sign in to comment.