C# 클래스 SharpMap.Data.Providers.GeometryProvider

Datasource for storing a limited set of geometries.

The GeometryProvider doesn’t utilize performance optimizations of spatial indexing, and thus is primarily meant for rendering a limited set of Geometries.

A common use of the GeometryProvider is for highlighting a set of selected features.

The following example gets data within a BoundingBox of another datasource and adds it to the map. List<Geometry> geometries = myMap.Layers[0].DataSource.GetGeometriesInView(myBox); VectorLayer laySelected = new VectorLayer("Selected Features"); laySelected.DataSource = new GeometryProvider(geometries); laySelected.Style.Outline = new Pen(Color.Magenta, 3f); laySelected.Style.EnableOutline = true; myMap.Layers.Add(laySelected); Adding points of interest to the map. This is useful for vehicle tracking etc. List<SharpMap.Geometries.Geometry> geometries = new List<SharpMap.Geometries.Geometry>(); //Add two points geometries.Add(new SharpMap.Geometries.Point(23.345,64.325)); geometries.Add(new SharpMap.Geometries.Point(23.879,64.194)); SharpMap.Layers.VectorLayer layerVehicles = new SharpMap.Layers.VectorLayer("Vechicles"); layerVehicles.DataSource = new SharpMap.Data.Providers.GeometryProvider(geometries); layerVehicles.Style.Symbol = Bitmap.FromFile(@"C:\data\car.gif"); myMap.Layers.Add(layerVehicles);
상속: SharpMap.Data.Providers.IProvider, IDisposable
파일 보기 프로젝트 열기: jumpinjackie/fdotoolbox 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : void

Closes the datasource

Dispose ( ) : void

Disposes the object

ExecuteIntersectionQuery ( Geometry geom, SharpMap.Data.FeatureDataSet ds ) : void

Throws an NotSupportedException. Attribute data is not supported by this datasource

ExecuteIntersectionQuery ( SharpMap box, SharpMap.Data.FeatureDataSet ds ) : void

Throws an NotSupportedException. Attribute data is not supported by this datasource

GeometryProvider ( SharpMap.Data.FeatureDataRow feature ) : System

Initializes a new instance of the GeometryProvider

GeometryProvider ( FeatureDataTable features ) : System

Initializes a new instance of the GeometryProvider

GeometryProvider ( Geometry geometry ) : System

Initializes a new instance of the GeometryProvider

GeometryProvider ( List geometries ) : System

Initializes a new instance of the GeometryProvider

GeometryProvider ( byte wellKnownBinaryGeometry ) : System

Initializes a new instance of the GeometryProvider

GeometryProvider ( string wellKnownTextGeometry ) : System

Initializes a new instance of the GeometryProvider

GetExtents ( ) : BoundingBox

Boundingbox of dataset

GetFeature ( uint RowID ) : SharpMap.Data.FeatureDataRow

Throws an NotSupportedException. Attribute data is not supported by this datasource

GetFeatureCount ( ) : int

Returns the number of features in the dataset

GetGeometriesInView ( BoundingBox bbox ) : List

Returns features within the specified bounding box

GetGeometryByID ( uint oid ) : Geometry

Returns the geometry corresponding to the Object ID

GetObjectIDsInView ( BoundingBox bbox ) : List

Returns all objects whose boundingbox intersects 'bbox'.

GetXYTolerance ( ) : double?
Open ( ) : void

Opens the datasource

메소드 상세

Close() 공개 메소드

Closes the datasource
public Close ( ) : void
리턴 void

Dispose() 공개 메소드

Disposes the object
public Dispose ( ) : void
리턴 void

ExecuteIntersectionQuery() 공개 메소드

Throws an NotSupportedException. Attribute data is not supported by this datasource
public ExecuteIntersectionQuery ( Geometry geom, SharpMap.Data.FeatureDataSet ds ) : void
geom Geometry
ds SharpMap.Data.FeatureDataSet FeatureDataSet to fill data into
리턴 void

ExecuteIntersectionQuery() 공개 메소드

Throws an NotSupportedException. Attribute data is not supported by this datasource
public ExecuteIntersectionQuery ( SharpMap box, SharpMap.Data.FeatureDataSet ds ) : void
box SharpMap
ds SharpMap.Data.FeatureDataSet FeatureDataSet to fill data into
리턴 void

GeometryProvider() 공개 메소드

Initializes a new instance of the GeometryProvider
public GeometryProvider ( SharpMap.Data.FeatureDataRow feature ) : System
feature SharpMap.Data.FeatureDataRow Feature to be in this datasource
리턴 System

GeometryProvider() 공개 메소드

Initializes a new instance of the GeometryProvider
public GeometryProvider ( FeatureDataTable features ) : System
features FeatureDataTable Features to be included in this datasource
리턴 System

GeometryProvider() 공개 메소드

Initializes a new instance of the GeometryProvider
public GeometryProvider ( Geometry geometry ) : System
geometry Geometry Geometry to be in this datasource
리턴 System

GeometryProvider() 공개 메소드

Initializes a new instance of the GeometryProvider
public GeometryProvider ( List geometries ) : System
geometries List Set of geometries that this datasource should contain
리턴 System

GeometryProvider() 공개 메소드

Initializes a new instance of the GeometryProvider
public GeometryProvider ( byte wellKnownBinaryGeometry ) : System
wellKnownBinaryGeometry byte as Well-known Binary to be included in this datasource
리턴 System

GeometryProvider() 공개 메소드

Initializes a new instance of the GeometryProvider
public GeometryProvider ( string wellKnownTextGeometry ) : System
wellKnownTextGeometry string as Well-known Text to be included in this datasource
리턴 System

GetExtents() 공개 메소드

Boundingbox of dataset
public GetExtents ( ) : BoundingBox
리턴 BoundingBox

GetFeature() 공개 메소드

Throws an NotSupportedException. Attribute data is not supported by this datasource
public GetFeature ( uint RowID ) : SharpMap.Data.FeatureDataRow
RowID uint
리턴 SharpMap.Data.FeatureDataRow

GetFeatureCount() 공개 메소드

Returns the number of features in the dataset
public GetFeatureCount ( ) : int
리턴 int

GetGeometriesInView() 공개 메소드

Returns features within the specified bounding box
public GetGeometriesInView ( BoundingBox bbox ) : List
bbox BoundingBox
리턴 List

GetGeometryByID() 공개 메소드

Returns the geometry corresponding to the Object ID
public GetGeometryByID ( uint oid ) : Geometry
oid uint Object ID
리턴 Geometry

GetObjectIDsInView() 공개 메소드

Returns all objects whose boundingbox intersects 'bbox'.
public GetObjectIDsInView ( BoundingBox bbox ) : List
bbox BoundingBox
리턴 List

GetXYTolerance() 공개 메소드

public GetXYTolerance ( ) : double?
리턴 double?

Open() 공개 메소드

Opens the datasource
public Open ( ) : void
리턴 void