Inheritance: IPlugInCursorHelper
Ejemplo n.º 1
0
        public IPlugInCursorHelper FetchByEnvelope(int ClassIndex, IEnvelope env, bool strictSearch, string WhereClause, object FieldMap)
        {
            if (this.DatasetType == esriDatasetType.esriDTTable)
            {
                return(null);
            }

            //env passed in always has same spatial reference as the data
            //for identify, it will check if search geometry intersect dataset bound
            //but not ITable.Search(pSpatialQueryFilter, bRecycle) etc
            //so here we should check if input env falls within extent
            IEnvelope boundEnv = this.Bounds;

            boundEnv.Project(env.SpatialReference);
            if (boundEnv.IsEmpty)
            {
                return(null);                   //or raise error?
            }
            try
            {
                SimplePointCursor spatialCursor = new SimplePointCursor(m_fullPath,
                                                                        this.get_Fields(ClassIndex), -1,
                                                                        (System.Array)FieldMap, env, this.geometryTypeByID(ClassIndex));
                setMZ(spatialCursor, ClassIndex);

                return((IPlugInCursorHelper)spatialCursor);
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.Message);
                return(null);
            }
        }
Ejemplo n.º 2
0
 public IPlugInCursorHelper FetchAll(int ClassIndex, string WhereClause, object FieldMap)
 {
     try
     {
         SimplePointCursor allCursor =
             new SimplePointCursor(m_fullPath, this.get_Fields(ClassIndex), -1,
                                   (System.Array)FieldMap, null, this.geometryTypeByID(ClassIndex));
         setMZ(allCursor, ClassIndex);
         return((IPlugInCursorHelper)allCursor);
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine(ex.Message);
         return(null);
     }
 }
Ejemplo n.º 3
0
        public IPlugInCursorHelper FetchByID(int ClassIndex, int ID, object FieldMap)
        {
            try
            {
                SimplePointCursor idCursor =
                    new SimplePointCursor(m_fullPath, this.get_Fields(ClassIndex), ID,
                                          (System.Array)FieldMap, null, this.geometryTypeByID(ClassIndex));

                setMZ(idCursor, ClassIndex);
                return((IPlugInCursorHelper)idCursor);
            }
            catch (Exception ex)                //will catch NextRecord error if it reaches EOF without finding a record
            {
                System.Diagnostics.Debug.WriteLine(ex.Message);
                return(null);
            }
        }
Ejemplo n.º 4
0
 private void setMZ(SimplePointCursor sptCursor, int Index)
 {
     sptCursor.HasM = ((Index >= 3 && Index < 6) || Index >= 9);
     sptCursor.HasZ = (Index >= 6);
 }