Exemple #1
0
        public ShapeDataReader(string shapeFilePath, ISpatialIndex <ShapeLocationInFileInfo> index, IGeometryFactory geoFactory, bool buildIndexAsync)
        {
            m_SpatialIndex = index;
            m_GeoFactory   = geoFactory;

            ValidateParameters(shapeFilePath);

            m_ShapeReader = new ShapeReader(shapeFilePath);

            if (buildIndexAsync)
            {
                m_CancellationTokenSrc = new CancellationTokenSource();
                m_IndexCreationTask    = Task.Factory.StartNew(FillSpatialIndex, m_CancellationTokenSrc.Token);
            }
            else
            {
                FillSpatialIndex();
            }

            m_DbfReader = new DbaseReader(Path.ChangeExtension(shapeFilePath, DBF_EXT));
        }
        public ShapeDataReader(IStreamProviderRegistry streamProviderRegistry, ISpatialIndex <ShapeLocationInFileInfo> index, IGeometryFactory geoFactory, bool buildIndexAsync)
        {
            m_SpatialIndex = index;
            m_GeoFactory   = geoFactory;

            ValidateParameters();

            m_ShapeReader = new ShapeReader(streamProviderRegistry);

            if (buildIndexAsync)
            {
                m_CancellationTokenSrc = new CancellationTokenSource();
                m_IndexCreationTask    = Task.Factory.StartNew(FillSpatialIndex, m_CancellationTokenSrc.Token);
            }
            else
            {
                FillSpatialIndex();
            }

            m_DbfReader = new DbaseReader(streamProviderRegistry[StreamTypes.Data]);
        }
	    public ShapeDataReader(string shapeFilePath, ISpatialIndex<ShapeLocationInFileInfo> index, IGeometryFactory geoFactory, bool buildIndexAsync)
		{
			m_SpatialIndex = index;
			m_GeoFactory = geoFactory;

			ValidateParameters(shapeFilePath);

			m_ShapeReader = new ShapeReader(shapeFilePath);

			if (buildIndexAsync)
			{
                m_CancellationTokenSrc = new CancellationTokenSource();
                m_IndexCreationTask = Task.Factory.StartNew(FillSpatialIndex, m_CancellationTokenSrc.Token);
			}
			else
			{
				FillSpatialIndex();
			}

			m_DbfReader = new DbaseReader(Path.ChangeExtension(shapeFilePath, DBF_EXT));			
		}
        public ShapeDataReader(IStreamProviderRegistry streamProviderRegistry , ISpatialIndex<ShapeLocationInFileInfo> index, IGeometryFactory geoFactory, bool buildIndexAsync)
        {


            m_SpatialIndex = index;
            m_GeoFactory = geoFactory;

            ValidateParameters();


            m_ShapeReader = new ShapeReader(streamProviderRegistry);

            if (buildIndexAsync)
            {
                m_CancellationTokenSrc = new CancellationTokenSource();
                m_IndexCreationTask = Task.Factory.StartNew(FillSpatialIndex, m_CancellationTokenSrc.Token);
            }
            else
            {
                FillSpatialIndex();
            }

            m_DbfReader = new DbaseReader(streamProviderRegistry[StreamTypes.Data]);
        }