forked from SharpMap/SharpMap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIProviderBase.cs
More file actions
75 lines (65 loc) · 2.55 KB
/
IProviderBase.cs
File metadata and controls
75 lines (65 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
using System;
using System.Collections.ObjectModel;
using GeoAPI.Geometries;
namespace SharpMap.Data.Providers
{
/// <summary>
/// Base interface for providers
/// </summary>
public interface IBaseProvider : IDisposable
{
/// <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>
/// Returns true if the datasource is currently open
/// </summary>
bool IsOpen { get; }
/// <summary>
/// The spatial reference ID (CRS)
/// </summary>
int SRID { get; set; }
/// <summary>
/// Gets the features within the specified <see cref="GeoAPI.Geometries.Envelope"/>
/// </summary>
/// <param name="bbox"></param>
/// <returns>Features within the specified <see cref="GeoAPI.Geometries.Envelope"/></returns>
Collection<IGeometry> GetGeometriesInView(Envelope bbox);
/// <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(IGeometry 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(Envelope box, FeatureDataSet ds);
/// <summary>
/// Returns the number of features in the dataset
/// </summary>
/// <returns>number of features</returns>
int GetFeatureCount();
/// <summary>
/// <see cref="Envelope"/> of dataset
/// </summary>
/// <returns>The 2d extent of the layer</returns>
Envelope GetExtents();
/// <summary>
/// Opens the datasource
/// </summary>
void Open();
/// <summary>
/// Closes the datasource
/// </summary>
void Close();
}
}