Class WfsFeatureLayer
This class represents the wfs(web feature service) FeauteLayer.
public class WfsFeatureLayer : FeatureLayer
- Inheritance
-
WfsFeatureLayer
- Inherited Members
Remarks
This class allows you to get features from an wfs server.
Constructors
WfsFeatureLayer()
WfsFeatureLayer Constructor.
public WfsFeatureLayer()
WfsFeatureLayer(string, string)
WfsFeatureSource Constructor
public WfsFeatureLayer(string serviceLocationUrl, string typeName)
Parameters
serviceLocationUrl
stringThe url of wfs service.
typeName
stringThe typename in the specify wfs service.
Remarks
The parameters can not be null.
Properties
HasBoundingBox
This property indicates whether a Layer has a BoundingBox or not. If it has no BoundingBox, it will throw an exception when you call the GetBoundingBox() and GetFullExtent() APIs.
public override bool HasBoundingBox { get; }
Property Value
Remarks
The default value is false.
LastXmlResponse
The xml text represnets last respone, it will pass out by RequestedData event with parameter.
public string LastXmlResponse { get; }
Property Value
ServiceLocationUrl
The url of wfs service.
public string ServiceLocationUrl { get; set; }
Property Value
TimeoutInSeconds
This property specifies the timeout of the web request in seconds. The default timeout value is 20 seconds.
public int TimeoutInSeconds { get; set; }
Property Value
TypeName
The typename in the specify wfs service.
public string TypeName { get; set; }
Property Value
WebProxy
This property gets or sets the proxy used for requesting a Web Response.
public IWebProxy WebProxy { get; set; }
Property Value
Methods
GetCapabilities(string)
Get capabilities from the specific wfs service url.
public static string GetCapabilities(string serviceLocationUrl)
Parameters
serviceLocationUrl
stringThe url of wfs service.
Returns
- string
The xml text represents capabilities of this wfs server.
Remarks
Every OGC Web Service (OWS), including a Web Feature Service, must have the ability to describe its capabilities by returning service metadata in response to a GetCapabilities request. Specifically, every web feature service must support the KVP encoded form of the GetCapabilities request over HTTP GET so that a client can always know how to obtain a capabilities document.
The capabilities response document contains the following sections: 1. Service Identification section The service identification section provides information about the WFS service itself. 2. Service Provider section The service provider section provides metadata about the organization operating the WFS server. 3. Operation Metadata section The operations metadata section provides metadata about the operations defined in this specification and implemented by a particular WFS server. This metadata includes the DCP, parameters and constraints for each operation. 4. FeatureType list section This section defines the list of feature types (and operations on each feature type) that are available from a web feature service. Additional information, such as the default SRS, any other supported SRSs, or no SRS whatsoever (for non-spatial feature types), for WFS requests is provided for each feature type. 5. ServesGMLObjectType list section This section defines the list of GML Object types, not derived from gml:AbstractFeatureType, that are available from a web feature service that supports the GetGMLObject operation. These types may be defined in a base GML schema, or in an application schema using its own namespace. 6. SupportsGMLObjectType list section The Supports GML Object Type section defines the list of GML Object types that a WFS server would be capable of serving if it was deployed to serve data. described by an application schema that either used those GML Object types directly (for non-abstract types), or defined derived types based on those types. 7. Filter capabilities section The schema of the Filter Capabilities Section is defined in the Filter Encoding Implementation Specification [3]. This is an optional section. If it exists, then the WFS should support the operations advertised therein. If the Filter Capabilities Section is not defined, then the client should assume that the server only supports the minimum default set of filter operators.
Exceptions
- ArgumentNullException
If serviceLocationUrl is null, we will throw an ArgumentNullException.
- ArgumentException
If serviceLocationUrl is empty, we will throw an ArgumentException.
GetCapabilities(Uri)
Get capabilities from the specific wfs service url.
public static string GetCapabilities(Uri serverUri)
Parameters
serverUri
UriThe url of wfs service.
Returns
- string
The xml text represents capabilities of this wfs server.
Remarks
Every OGC Web Service (OWS), including a Web Feature Service, must have the ability to describe its capabilities by returning service metadata in response to a GetCapabilities request. Specifically, every web feature service must support the KVP encoded form of the GetCapabilities request over HTTP GET so that a client can always know how to obtain a capabilities document.
The capabilities response document contains the following sections: 1. Service Identification section The service identification section provides information about the WFS service itself. 2. Service Provider section The service provider section provides metadata about the organization operating the WFS server. 3. Operation Metadata section The operations metadata section provides metadata about the operations defined in this specification and implemented by a particular WFS server. This metadata includes the DCP, parameters and constraints for each operation. 4. FeatureType list section This section defines the list of feature types (and operations on each feature type) that are available from a web feature service. Additional information, such as the default SRS, any other supported SRSs, or no SRS whatsoever (for non-spatial feature types), for WFS requests is provided for each feature type. 5. ServesGMLObjectType list section This section defines the list of GML Object types, not derived from gml:AbstractFeatureType, that are available from a web feature service that supports the GetGMLObject operation. These types may be defined in a base GML schema, or in an application schema using its own namespace. 6. SupportsGMLObjectType list section The Supports GML Object Type section defines the list of GML Object types that a WFS server would be capable of serving if it was deployed to serve data. described by an application schema that either used those GML Object types directly (for non-abstract types), or defined derived types based on those types. 7. Filter capabilities section The schema of the Filter Capabilities Section is defined in the Filter Encoding Implementation Specification [3]. This is an optional section. If it exists, then the WFS should support the operations advertised therein. If the Filter Capabilities Section is not defined, then the client should assume that the server only supports the minimum default set of filter operators.
Exceptions
- ArgumentNullException
If serviceLocationUrl is null, we will throw an ArgumentNullException.
- ArgumentException
If serviceLocationUrl is empty, we will throw an ArgumentException.
GetCapabilities(Uri, IWebProxy)
Get capabilities from the specific wfs service url.
public static string GetCapabilities(Uri serverUri, IWebProxy webProxy)
Parameters
serverUri
UriThe url of wfs service.
webProxy
IWebProxyThe proxy of the wfs service.
Returns
- string
The xml text represents capabilities of this wfs server.
Remarks
Every OGC Web Service (OWS), including a Web Feature Service, must have the ability to describe its capabilities by returning service metadata in response to a GetCapabilities request. Specifically, every web feature service must support the KVP encoded form of the GetCapabilities request over HTTP GET so that a client can always know how to obtain a capabilities document.
The capabilities response document contains the following sections: 1. Service Identification section The service identification section provides information about the WFS service itself. 2. Service Provider section The service provider section provides metadata about the organization operating the WFS server. 3. Operation Metadata section The operations metadata section provides metadata about the operations defined in this specification and implemented by a particular WFS server. This metadata includes the DCP, parameters and constraints for each operation. 4. FeatureType list section This section defines the list of feature types (and operations on each feature type) that are available from a web feature service. Additional information, such as the default SRS, any other supported SRSs, or no SRS whatsoever (for non-spatial feature types), for WFS requests is provided for each feature type. 5. ServesGMLObjectType list section This section defines the list of GML Object types, not derived from gml:AbstractFeatureType, that are available from a web feature service that supports the GetGMLObject operation. These types may be defined in a base GML schema, or in an application schema using its own namespace. 6. SupportsGMLObjectType list section The Supports GML Object Type section defines the list of GML Object types that a WFS server would be capable of serving if it was deployed to serve data. described by an application schema that either used those GML Object types directly (for non-abstract types), or defined derived types based on those types. 7. Filter capabilities section The schema of the Filter Capabilities Section is defined in the Filter Encoding Implementation Specification [3]. This is an optional section. If it exists, then the WFS should support the operations advertised therein. If the Filter Capabilities Section is not defined, then the client should assume that the server only supports the minimum default set of filter operators.
Exceptions
- ArgumentNullException
If serviceLocationUrl is null, we will throw an ArgumentNullException.
- ArgumentException
If serviceLocationUrl is empty, we will throw an ArgumentException.
GetLayers(string)
Get layer names from specific wfs service url.
public static Collection<string> GetLayers(string serviceLocationUrl)
Parameters
serviceLocationUrl
stringThe url of wfs service.
Returns
- Collection<string>
The collection represent layer names.
Remarks
Typically, it will call WfsFeatureSource.GetLayers(serviceLocationUrl) internally.
Exceptions
- ArgumentNullException
If serviceLocationUrl is null, we will throw an ArgumentNullException.
- ArgumentException
If serviceLocationUrl is empty, we will throw an ArgumentException.
GetLayers(Uri)
Get layer names from specific wfs service url.
public static Collection<string> GetLayers(Uri serverUri)
Parameters
serverUri
UriThe url of wfs service.
Returns
- Collection<string>
The collection represent layer names.
GetLayers(Uri, IWebProxy)
Get layer names from specific wfs service url.
public static Collection<string> GetLayers(Uri serverUri, IWebProxy webProxy)
Parameters
serverUri
UriThe url of wfs service.
webProxy
IWebProxyThe proxy of the wfs service.
Returns
- Collection<string>
The collection represent layer names.
Remarks
Typically, it will call WfsFeatureSource.GetLayers(serverUri) internally.
Events
SendingWebRequest
public event EventHandler<SendingWebRequestEventArgs> SendingWebRequest
Event Type
SentWebRequest
public event EventHandler<SentWebRequestEventArgs> SentWebRequest