CUAHSI / HydroDesktop

HydroDesktop is a free and open source GIS enabled desktop application that helps you search for, download, visualize, and analyze hydrologic and climate data registered with the CUAHSI Hydrologic Information System. HydroDesktop is part of the legacy CUAHSI toolkit and is not under active development. Click the "releases" link below to download the latest installer for Microsoft Windows.
73 stars 20 forks source link

Duplicate units #59

Open xhqiao89 opened 7 years ago

xhqiao89 commented 7 years ago

mogikanin[CodePlex]
When HD saving series, it also save units for OffsetType. HD checks that unit exists in the local database by all unit's fields: UnitsName, UnitsType and UnitsAbbreviation.

But xml with datavalues contains just UnitsAbbreviation and UnitsName: e.g.

ltoffset offsetTypeID=quot28quotgt ltoffsetDescriptiongtBelow ground surfacelt/offsetDescriptiongt ltunits unitsAbbreviation=quotcmquot unitsCode=quot47quotgtcentimeterlt/unitsgt

lt/offsetgt

So, after save series, in Units table there are 2 same units: UnintsName | UnitsType | UnitsAbbreviation| centimeter Length cm centimeter unknown cm

I think, need check that unit exists in the database only by 2 fields: UnintsName and UnitsAbbreviation

P.S. I tested this on quotDry Creek Experimental Watershedquot and keyword quotSoil Moisturequot.

xhqiao89 commented 7 years ago

smithry[CodePlex]
I don't understand this issue. I have not been able to find an option, in saving a series, to view UnitsName or UnitsAbbreviation. Since Jacob resolved the issue, maybe Eric could test it?

xhqiao89 commented 7 years ago

jacobean[CodePlex]
I changed it so that it only compares UnitsName and UnitsAbbreviation.

Test in: v1.6.10

xhqiao89 commented 7 years ago

jirikadlec2[CodePlex]
I agree. When saving unit, the code should only compare UnitsName and UnitsAbbreviation.