⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iprovider.cs

📁 C# 的地图开发例子(sharp map)
💻 CS
字号:
// Copyright 2005, 2006 - Morten Nielsen (www.iter.dk)
//
// This file is part of SharpMap.
// SharpMap is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// 
// SharpMap is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.

// You should have received a copy of the GNU Lesser General Public License
// along with SharpMap; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;

namespace SharpMap.Data.Providers
{
	/// <summary>
	/// Interface for data providers
	/// </summary>
	public interface IProvider : IDisposable
	{
		/// <summary>
		/// Gets the features within the specified <see cref="SharpMap.Geometries.BoundingBox"/>
		/// </summary>
		/// <param name="bbox"></param>
		/// <returns>Features within the specified <see cref="SharpMap.Geometries.BoundingBox"/></returns>
        System.Collections.ObjectModel.Collection<SharpMap.Geometries.Geometry> GetGeometriesInView(SharpMap.Geometries.BoundingBox bbox);

		/// <summary>
		/// Returns all objects whose <see cref="SharpMap.Geometries.BoundingBox"/> intersects 'bbox'.
		/// </summary>
		/// <remarks>
		/// This method is usually much faster than the QueryFeatures method, because intersection tests
		/// are performed on objects simplifed by their <see cref="SharpMap.Geometries.BoundingBox"/>, and using the Spatial Index
		/// </remarks>
		/// <param name="bbox">Box that objects should intersect</param>
		/// <returns></returns>
        System.Collections.ObjectModel.Collection<uint> GetObjectIDsInView(SharpMap.Geometries.BoundingBox bbox);

		/// <summary>
		/// Returns the geometry corresponding to the Object ID
		/// </summary>
		/// <param name="oid">Object ID</param>
		/// <returns>geometry</returns>
		SharpMap.Geometries.Geometry GetGeometryByID(uint oid);
			
		/// <summary>
		/// Returns the data associated with all the geometries that are intersected by 'geom'
		/// </summary>
		/// <param name="geom">Geometry to intersect with</param>
		/// <param name="ds">FeatureDataSet to fill data into</param>
		void ExecuteIntersectionQuery(SharpMap.Geometries.Geometry geom, FeatureDataSet ds);

		/// <summary>
		/// Returns the data associated with all the geometries that are intersected by 'geom'
		/// </summary>
		/// <param name="box">Geometry to intersect with</param>
		/// <param name="ds">FeatureDataSet to fill data into</param>
		void ExecuteIntersectionQuery(SharpMap.Geometries.BoundingBox box, FeatureDataSet ds);

		/// <summary>
		/// Returns the number of features in the dataset
		/// </summary>
		/// <returns>number of features</returns>
		int GetFeatureCount();

		/// <summary>
		/// Returns a <see cref="SharpMap.Data.FeatureDataRow"/> based on a RowID
		/// </summary>
		/// <param name="RowID"></param>
		/// <returns>datarow</returns>
		SharpMap.Data.FeatureDataRow GetFeature(uint RowID);
		
		/// <summary>
		/// <see cref="SharpMap.Geometries.BoundingBox"/> of dataset
		/// </summary>
		/// <returns>boundingbox</returns>
		SharpMap.Geometries.BoundingBox GetExtents();

		/// <summary>
		/// Gets the connection ID of the datasource
		/// </summary>
		/// <remarks>
		/// <para>The ConnectionID should be unique to the datasource (for instance the filename or the
		/// connectionstring), and is meant to be used for connection pooling.</para>
		/// <para>If connection pooling doesn't apply to this datasource, the ConnectionID should return String.Empty</para>
		/// </remarks>
		string ConnectionID { get; }
		/// <summary>
		/// Opens the datasource
		/// </summary>
		void Open();
		/// <summary>
		/// Closes the datasource
		/// </summary>
		void Close();
		/// <summary>
		/// Returns true if the datasource is currently open
		/// </summary>
		bool IsOpen { get; }
		/// <summary>
		/// The spatial reference ID (CRS)
		/// </summary>
		int SRID { get; set;}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -