public static MonitoringLocationDataType MapMonitoringLocation(NamedNullMappingDataReader readerEx) { MonitoringLocationDataType location = new MonitoringLocationDataType(); location.MonitoringLocationIdentity = new MonitoringLocationIdentityDataType(); location.MonitoringLocationIdentity.MonitoringLocationIdentifier = readerEx.GetString("MONITORINGLOCATIONID"); location.MonitoringLocationIdentity.MonitoringLocationName = readerEx.GetString("MONLOCNAME"); location.MonitoringLocationIdentity.MonitoringLocationTypeName = readerEx.GetString("MONLOCTYPE"); location.MonitoringLocationIdentity.MonitoringLocationDescriptionText = readerEx.GetNullString("MONLOCDESC"); location.MonitoringLocationIdentity.HUCEightDigitCode = readerEx.GetNullString("HUCEIGHTDIGITCODE"); location.MonitoringLocationIdentity.HUCTwelveDigitCode = readerEx.GetNullString("HUCTWELVEDIGITCODE"); location.MonitoringLocationIdentity.TribalLandIndicatorSpecified = !readerEx.IsDBNull("TRIBALLANDIND"); location.MonitoringLocationIdentity.TribalLandIndicator = ToBool(readerEx.GetString("TRIBALLANDIND")); if (location.MonitoringLocationIdentity.TribalLandIndicator) { location.MonitoringLocationIdentity.TribalLandName = readerEx.GetNullString("TRIBALLANDNAME"); } if (!readerEx.IsDBNull("LATITUDEMEASURE") || !readerEx.IsDBNull("LONGITUDEMEASURE") || !readerEx.IsDBNull("HORIZCOLLMETHOD") || !readerEx.IsDBNull("HORIZCOORDREFSYSDATUM")) { location.MonitoringLocationGeospatial = new MonitoringLocationGeospatialDataType(); location.MonitoringLocationGeospatial.LatitudeMeasure = ToDecimal(readerEx.GetString("LATITUDEMEASURE")); location.MonitoringLocationGeospatial.LongitudeMeasure = ToDecimal(readerEx.GetString("LONGITUDEMEASURE")); location.MonitoringLocationGeospatial.SourceMapScaleNumeric = readerEx.GetInt32("SOURCEMAPSCALE").ToString(); location.MonitoringLocationGeospatial.HorizontalAccuracyMeasure = GetNullMeasureCompactData(readerEx, "HORIZACCURACYMEASURE", "HORIZACCURACYMEASUREUNIT"); location.MonitoringLocationGeospatial.HorizontalCollectionMethodName = readerEx.GetString("HORIZCOLLMETHOD"); location.MonitoringLocationGeospatial.HorizontalCoordinateReferenceSystemDatumName = readerEx.GetString("HORIZCOORDREFSYSDATUM"); location.MonitoringLocationGeospatial.VerticalMeasure = GetNullMeasureCompactData(readerEx, "VERTICALMEASURE", "VERTICALMEASUREUNIT"); location.MonitoringLocationGeospatial.VerticalCollectionMethodName = readerEx.GetNullString("VERTICALCOLLMETHOD"); location.MonitoringLocationGeospatial.VerticalCoordinateReferenceSystemDatumName = readerEx.GetNullString("VERTICALCOORDREFSYSDATUM"); location.MonitoringLocationGeospatial.CountryCode = readerEx.GetNullString("COUNTRYCODE"); location.MonitoringLocationGeospatial.StateCode = readerEx.GetNullString("STATECODE"); location.MonitoringLocationGeospatial.CountyCode = readerEx.GetNullString("COUNTYCODE"); } if (!readerEx.IsDBNull("WELLTYPE")) { location.WellInformation = new WellInformationDataType(); location.WellInformation.WellTypeText = readerEx.GetString("WELLTYPE"); location.WellInformation.AquiferName = readerEx.GetNullString("AQUIFERNAME"); location.WellInformation.FormationTypeText = readerEx.GetNullString("FORMATIONTYPE"); location.WellInformation.WellHoleDepthMeasure = GetNullMeasureCompactData(readerEx, "WELLHOLEDEPTHMEASURE", "WELLHOLEDEPTHMEASUREUNIT"); } return(location); }