Пример #1
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 21JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * get a map object at given index.
         */
        public MapObject GetMapObject(RecordIndex recordIndex)
        {
            DataReader.Seek(_reader, recordIndex.RecordOffset);
            MapObject mapObject = null;

            switch (recordIndex.MapObjectType)
            {
            case MapObject.NONE:
                mapObject = new MapNoneObject();
                break;

            case MapObject.POINT:
                mapObject = GetMapPoint(recordIndex);
                break;

            case MapObject.MULTIPOINT:
                mapObject = GetMapMultiPoint(recordIndex);
                break;

            case MapObject.PLINE:
                mapObject = GetMapPline(recordIndex);
                break;

            case MapObject.MULTIPLINE:
                mapObject = GetMapMultiPline(recordIndex);
                break;

            case MapObject.REGION:
                mapObject = GetMapRegion(recordIndex);
                break;

            case MapObject.MULTIREGION:
                mapObject = GetMapMultiRegion(recordIndex);
                break;

            case MapObject.COLLECTION:
                mapObject = GetMapCollection(recordIndex);
                break;

            case MapObject.TEXT:
                mapObject = GetMapText(recordIndex);
                break;
            }
            return(mapObject);
        }
Пример #2
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 18JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * Copy constructor.
         * @param noneObject     none object copy from.
         */
        public MapNoneObject(MapNoneObject noneObject)
            : base(noneObject)
        {
            SetMapObjectType(NONE);
        }
Пример #3
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 21JUN2009  James Shen                 	          Initial Creation
        ////////////////////////////////////////////////////////////////////////////
        /**
         * get a map object at given index.
         */
        public MapObject GetMapObject(RecordIndex recordIndex)
        {
            DataReader.Seek(_reader, recordIndex.RecordOffset);
            MapObject mapObject = null;
            switch (recordIndex.MapObjectType)
            {
                case MapObject.NONE:
                    mapObject = new MapNoneObject();
                    break;
                case MapObject.POINT:
                    mapObject = GetMapPoint(recordIndex);
                    break;
                case MapObject.MULTIPOINT:
                    mapObject = GetMapMultiPoint(recordIndex);
                    break;
                case MapObject.PLINE:
                    mapObject = GetMapPline(recordIndex);
                    break;
                case MapObject.MULTIPLINE:
                    mapObject = GetMapMultiPline(recordIndex);
                    break;
                case MapObject.REGION:
                    mapObject = GetMapRegion(recordIndex);
                    break;
                case MapObject.MULTIREGION:
                    mapObject = GetMapMultiRegion(recordIndex);
                    break;
                case MapObject.COLLECTION:
                    mapObject = GetMapCollection(recordIndex);
                    break;
                case MapObject.TEXT:
                    mapObject = GetMapText(recordIndex);
                    break;

            }
            return mapObject;
        }
Пример #4
0
 ////////////////////////////////////////////////////////////////////////////
 //--------------------------------- REVISIONS ------------------------------
 // Date       Name                 Tracking #         Description
 // ---------  -------------------  -------------      ----------------------
 // 18JUN2009  James Shen                 	          Initial Creation
 ////////////////////////////////////////////////////////////////////////////
 /**
  * Copy constructor.
  * @param noneObject     none object copy from.
  */
 public MapNoneObject(MapNoneObject noneObject)
     : base(noneObject)
 {
     SetMapObjectType(NONE);
 }