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

        /**
         * Open the map file.
         */
        public void Open()
        {
            if (Header != null)
            {
                return;
            }

            Header       = new Header(_reader, 0, 0);
            _recordIndex = new RecordIndex(_reader, Header.IndexOffset,
                                           Header.IndexLength);
            _stringIndex = new StringIndex(_reader, Header.StringIndexOffset,
                                           Header.StringIndexLength);
            _stringData = new StringData(_reader, Header.StringDataOffset,
                                         Header.StringDataLength);
            _geoData = new GeoData(_reader, Header.GeoDataOffset,
                                   Header.GeoDataLength);
            TabularData = new TabularData(_reader, Header.TabularDataOffset,
                                          Header.TabularDataLength, Header.Fields,
                                          _stringData, _stringIndex);
            _rtreeIndex = new RTreeIndex(_reader, Header.RtreeIndexOffset,
                                         Header.RtreeIndexLength);
            _tree = new RTree.RTree(_rtreeIndex.File);
        }
Пример #2
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 21JUN2009  James Shen                 	          Initial Creation
        ////////////////////////////////////////////////////////////////////////////
        /**
         * Open the map file.
         */
        public void Open()
        {
            if (Header != null)
            {
                return;
            }

            Header = new Header(_reader, 0, 0);
            _recordIndex = new RecordIndex(_reader, Header.IndexOffset,
                    Header.IndexLength);
            _stringIndex = new StringIndex(_reader, Header.StringIndexOffset,
                    Header.StringIndexLength);
            _stringData = new StringData(_reader, Header.StringDataOffset,
                    Header.StringDataLength);
            _geoData = new GeoData(_reader, Header.GeoDataOffset,
                    Header.GeoDataLength);
            TabularData = new TabularData(_reader, Header.TabularDataOffset,
                    Header.TabularDataLength, Header.Fields,
                    _stringData, _stringIndex);
            _rtreeIndex = new RTreeIndex(_reader, Header.RtreeIndexOffset,
                    Header.RtreeIndexLength);
            _tree = new RTree.RTree(_rtreeIndex.File);
        }