public void AddOrientationDataPoints(string SqlWhereClause) { int idFld = m_OrientationDataPointsFC.FindField("OrientationDataPoints_ID"); int stationFld = m_OrientationDataPointsFC.FindField("StationID"); int typeFld = m_OrientationDataPointsFC.FindField("Type"); int idConfFld = m_OrientationDataPointsFC.FindField("IdentityConfidence"); int lblFld = m_OrientationDataPointsFC.FindField("Label"); int plotFld = m_OrientationDataPointsFC.FindField("PlotAtScale"); int aziFld = m_OrientationDataPointsFC.FindField("Azimuth"); int incFld = m_OrientationDataPointsFC.FindField("Inclination"); int orConfFld = m_OrientationDataPointsFC.FindField("OrientationConfidenceDegrees"); int notesFld = m_OrientationDataPointsFC.FindField("Notes"); int dsFld = m_OrientationDataPointsFC.FindField("DataSourceID"); int symbRotFld = m_OrientationDataPointsFC.FindField("SymbolRotation"); int symFld = m_OrientationDataPointsFC.FindField("Symbol"); IQueryFilter QF = new QueryFilterClass(); QF.WhereClause = SqlWhereClause; IFeatureCursor theCursor = m_OrientationDataPointsFC.Search(QF, false); IFeature theFeature = theCursor.NextFeature(); while (theFeature != null) { OrientationDataPoint anOrientationDataPoint = new OrientationDataPoint(); anOrientationDataPoint.OrientationDataPoints_ID = theFeature.get_Value(idFld).ToString(); anOrientationDataPoint.StationID = theFeature.get_Value(stationFld).ToString(); anOrientationDataPoint.Type = theFeature.get_Value(typeFld).ToString(); anOrientationDataPoint.IdentityConfidence = theFeature.get_Value(idConfFld).ToString(); anOrientationDataPoint.Label = theFeature.get_Value(lblFld).ToString(); bool result; result = int.TryParse(theFeature.get_Value(plotFld).ToString(), out anOrientationDataPoint.PlotAtScale); result = double.TryParse(theFeature.get_Value(aziFld).ToString(), out anOrientationDataPoint.Azimuth); result = double.TryParse(theFeature.get_Value(incFld).ToString(), out anOrientationDataPoint.Inclination); result = double.TryParse(theFeature.get_Value(orConfFld).ToString(), out anOrientationDataPoint.OrientationConfidenceDegrees); anOrientationDataPoint.Notes = theFeature.get_Value(notesFld).ToString(); anOrientationDataPoint.DataSourceID = theFeature.get_Value(dsFld).ToString(); result = double.TryParse(theFeature.get_Value(symbRotFld).ToString(), out anOrientationDataPoint.SymbolRotation); result = int.TryParse(theFeature.get_Value(symFld).ToString(), out anOrientationDataPoint.Symbol); anOrientationDataPoint.Shape = (IPoint)theFeature.Shape; anOrientationDataPoint.RequiresUpdate = true; m_OrientationDataPointsDictionary.Add(anOrientationDataPoint.OrientationDataPoints_ID, anOrientationDataPoint); theFeature = theCursor.NextFeature(); } }
public string NewOrientationDataPoint(string StationID, string Type, string IdentityConfidence, string Label, int PlotAtScale, double Azimuth, double Inclination, double OrientationConfidenceDegrees, string Notes, string DataSourceID, int SymbolRotation, int Symbol, IPoint Shape) { OrientationDataPoint newOrientationDataPoint = new OrientationDataPoint(); sysInfo SysInfoTable = new sysInfo(m_theWorkspace); newOrientationDataPoint.OrientationDataPoints_ID = SysInfoTable.ProjAbbr + ".OrientationDataPoints." + SysInfoTable.GetNextIdValue("OrientationDataPoints"); newOrientationDataPoint.StationID = StationID; newOrientationDataPoint.Type = Type; newOrientationDataPoint.IdentityConfidence = IdentityConfidence; newOrientationDataPoint.Label = Label; newOrientationDataPoint.PlotAtScale = PlotAtScale; newOrientationDataPoint.Azimuth = Azimuth; newOrientationDataPoint.Inclination = Inclination; newOrientationDataPoint.OrientationConfidenceDegrees = OrientationConfidenceDegrees; newOrientationDataPoint.Notes = Notes; newOrientationDataPoint.DataSourceID = DataSourceID; newOrientationDataPoint.SymbolRotation = SymbolRotation; newOrientationDataPoint.Symbol = Symbol; newOrientationDataPoint.Shape = Shape; newOrientationDataPoint.RequiresUpdate = false; m_OrientationDataPointsDictionary.Add(newOrientationDataPoint.OrientationDataPoints_ID, newOrientationDataPoint); return newOrientationDataPoint.OrientationDataPoints_ID; }
public void UpdateOrientationDataPoint(OrientationDataPoint theOrientationDataPoint) { try { m_OrientationDataPointsDictionary.Remove(theOrientationDataPoint.OrientationDataPoints_ID); } catch { } theOrientationDataPoint.RequiresUpdate = true; m_OrientationDataPointsDictionary.Add(theOrientationDataPoint.OrientationDataPoints_ID, theOrientationDataPoint); }