Search Results for

    Show / Hide Table of Contents

    Class WFSProvider

    WFS dataprovider This provider can be used to obtain data from an OGC Web Feature Service. It performs the following requests: 'GetCapabilities', 'DescribeFeatureType' and 'GetFeature'. This class is optimized for performing requests to GeoServer (http://geoserver.org). Supported geometries are:

    • PointPropertyType
    • LineStringPropertyType
    • PolygonPropertyType
    • CurvePropertyType
    • SurfacePropertyType
    • MultiPointPropertyType
    • MultiLineStringPropertyType
    • MultiPolygonPropertyType
    • MultiCurvePropertyType
    • MultiSurfacePropertyType
    Inheritance
    object
    WFSProvider
    Implements
    IProvider
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mapsui.Providers.Wfs
    Assembly: Mapsui.Nts.dll
    Syntax
    public class WFSProvider : IProvider, IDisposable

    Constructors

    | Edit this page View Source

    WFSProvider(WfsFeatureTypeInfo, WFSVersionEnum, IUrlPersistentCache?)

    Use this constructor for initializing this dataprovider with a WfsFeatureTypeInfo object, so that 'GetCapabilities' and 'DescribeFeatureType' can be bypassed.

    Declaration
    public WFSProvider(WfsFeatureTypeInfo featureTypeInfo, WFSProvider.WFSVersionEnum wfsVersion, IUrlPersistentCache? persistentCache = null)
    Parameters
    Type Name Description
    WfsFeatureTypeInfo featureTypeInfo

    The featureTypeInfo Instance

    WFSProvider.WFSVersionEnum wfsVersion

    The desired WFS Server version.

    IUrlPersistentCache persistentCache

    Persistent Cache

    | Edit this page View Source

    WFSProvider(IXPathQueryManager, string, string, GeometryTypeEnum, WFSVersionEnum, IUrlPersistentCache?)

    Use this constructor for initializing this dataprovider with all necessary parameters to gather metadata from 'GetCapabilities' contract.

    Declaration
    public WFSProvider(IXPathQueryManager getCapabilitiesCache, string nsPrefix, string featureType, GeometryTypeEnum geometryType, WFSProvider.WFSVersionEnum wfsVersion, IUrlPersistentCache? persistentCache = null)
    Parameters
    Type Name Description
    IXPathQueryManager getCapabilitiesCache

    This cache (obtained from an already instantiated dataprovider that retrieves a featuretype hosted by the same service) helps to speed up gathering metadata. It caches the 'GetCapabilities' response.

    string nsPrefix

    Use an empty string or 'null', if there is no prefix for the featuretype.

    string featureType

    The name of the feature type

    GeometryTypeEnum geometryType

    Specifying the geometry type helps to accelerate the rendering process, if the geometry type in 'DescribeFeatureType is unprecise.

    WFSProvider.WFSVersionEnum wfsVersion

    The desired WFS Server version.

    IUrlPersistentCache persistentCache

    persistent Cache

    | Edit this page View Source

    WFSProvider(IXPathQueryManager, string, string, WFSVersionEnum, IUrlPersistentCache?)

    Use this constructor for initializing this dataprovider with all necessary parameters to gather metadata from 'GetCapabilities' contract.

    Declaration
    public WFSProvider(IXPathQueryManager getCapabilitiesCache, string nsPrefix, string featureType, WFSProvider.WFSVersionEnum wfsVersion, IUrlPersistentCache? persistentCache = null)
    Parameters
    Type Name Description
    IXPathQueryManager getCapabilitiesCache

    This cache (obtained from an already instantiated dataprovider that retrieves a featuretype hosted by the same service) helps to speed up gathering metadata. It caches the 'GetCapabilities' response.

    string nsPrefix

    Use an empty string or 'null', if there is no prefix for the featuretype.

    string featureType

    The name of the feature type

    WFSProvider.WFSVersionEnum wfsVersion

    The desired WFS Server version.

    IUrlPersistentCache persistentCache

    persistent Cache

    | Edit this page View Source

    WFSProvider(string, string, string, string, string, GeometryTypeEnum, WFSVersionEnum, IUrlPersistentCache?)

    Use this constructor for initializing this dataprovider with all mandatory metadata for retrieving a featuretype, so that 'GetCapabilities' and 'DescribeFeatureType' can be bypassed.

    Declaration
    public WFSProvider(string serviceUri, string nsPrefix, string featureTypeNamespace, string featureType, string geometryName, GeometryTypeEnum geometryType, WFSProvider.WFSVersionEnum wfsVersion, IUrlPersistentCache? persistentCache = null)
    Parameters
    Type Name Description
    string serviceUri

    The service URL

    string nsPrefix

    Use an empty string or 'null', if there is no prefix for the featuretype.

    string featureTypeNamespace

    Use an empty string or 'null', if there is no namespace for the featuretype. You don't need to know the namespace of the feature type, if you use the quick geometries option.

    string featureType

    The name of the feature type

    string geometryName

    The name of the geometry.

    GeometryTypeEnum geometryType

    Specifying the geometry type helps to accelerate the rendering process.

    WFSProvider.WFSVersionEnum wfsVersion

    The desired WFS Server version.

    IUrlPersistentCache persistentCache

    Persistent Cache

    | Edit this page View Source

    WFSProvider(string, string, string, string, string, WFSVersionEnum, IUrlPersistentCache?)

    Use this constructor for initializing this dataprovider with all mandatory metadata for retrieving a featuretype, so that 'GetCapabilities' and 'DescribeFeatureType' can be bypassed.

    Declaration
    public WFSProvider(string serviceUri, string nsPrefix, string featureTypeNamespace, string featureType, string geometryName, WFSProvider.WFSVersionEnum wfsVersion, IUrlPersistentCache? persistentCache = null)
    Parameters
    Type Name Description
    string serviceUri

    The service URL

    string nsPrefix

    Use an empty string or 'null', if there is no prefix for the featuretype.

    string featureTypeNamespace

    Use an empty string or 'null', if there is no namespace for the featuretype. You don't need to know the namespace of the feature type, if you use the quick geometries option.

    string featureType

    The name of the feature type

    string geometryName

    The name of the geometry

    WFSProvider.WFSVersionEnum wfsVersion

    The desired WFS Server version.

    IUrlPersistentCache persistentCache

    Persistent Cache

    Properties

    | Edit this page View Source

    AxisOrder

    Gets or sets a value indicating the axis order

    Declaration
    public int[] AxisOrder { get; set; }
    Property Value
    Type Description
    int[]
    Remarks

    The axis order is an array of array offsets. It can be either {0, 1} or {1, 0}.

    If not set explictly, CrsAxisOrderRegistry is asked for a value based on SRID.
    | Edit this page View Source

    CRS

    The spatial reference ID (CRS)

    Declaration
    public string? CRS { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Credentials

    Gets or sets the network credentials used for authenticating the request with the Internet resource

    Declaration
    public ICredentials? Credentials { get; set; }
    Property Value
    Type Description
    ICredentials
    | Edit this page View Source

    DefaultCache

    Default Cache

    Declaration
    public static IUrlPersistentCache? DefaultCache { get; set; }
    Property Value
    Type Description
    IUrlPersistentCache
    | Edit this page View Source

    FeatureTypeInfo

    Gets feature metadata

    Declaration
    public WfsFeatureTypeInfo? FeatureTypeInfo { get; }
    Property Value
    Type Description
    WfsFeatureTypeInfo
    | Edit this page View Source

    GetCapabilitiesCache

    This cache (obtained from an already instantiated dataprovider that retrieves a featuretype hosted by the same service) helps to speed up gathering metadata. It caches the 'GetCapabilities' response.

    Declaration
    public IXPathQueryManager? GetCapabilitiesCache { get; set; }
    Property Value
    Type Description
    IXPathQueryManager
    | Edit this page View Source

    GetFeatureGetRequest

    Gets or sets a value indicating whether the 'GetFeature' request should be done with HTTP GET. This option can be important when obtaining data from a WFS provided by an UMN MapServer.

    Declaration
    public bool GetFeatureGetRequest { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Labels

    Gets or sets the property of the featuretype responsible for labels

    Declaration
    public List<string> Labels { get; set; }
    Property Value
    Type Description
    List<string>
    | Edit this page View Source

    MultiGeometries

    Gets or sets a value indicating whether the 'GetFeature' parser should ignore multi-geometries (MultiPoint, MultiLineString, MultiCurve, MultiPolygon, MultiSurface). By default it does not. Ignoring multi-geometries can lead to a better performance.

    Declaration
    public bool MultiGeometries { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    OgcFilter

    Gets or sets an OGC Filter.

    Declaration
    public IFilter? OgcFilter { get; set; }
    Property Value
    Type Description
    IFilter
    | Edit this page View Source

    ProxyUrl

    Gets and sets the proxy Url of the request.

    Declaration
    public string? ProxyUrl { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    QuickGeometries

    Gets or sets a value indicating whether extracting geometry information from 'GetFeature' response shall be done quickly without paying attention to context validation, polygon boundaries and multi-geometries. This option accelerates the geometry parsing process, but in scarce cases can lead to errors.

    Declaration
    public bool QuickGeometries { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    CreateAsync(string, string, string, GeometryTypeEnum, WFSVersionEnum, IUrlPersistentCache?, string?, ICredentials?)

    Initializes a new layer, and downloads and parses the service description

    Declaration
    public static Task<WFSProvider> CreateAsync(string getCapabilitiesUri, string nsPrefix, string featureType, GeometryTypeEnum geometryType, WFSProvider.WFSVersionEnum wfsVersion, IUrlPersistentCache? persistentCache = null, string? proxyUrl = null, ICredentials? credentials = null)
    Parameters
    Type Name Description
    string getCapabilitiesUri

    Url of WMS server

    string nsPrefix

    ns Prefix

    string featureType

    feature Type

    GeometryTypeEnum geometryType

    geometry Type

    WFSProvider.WFSVersionEnum wfsVersion

    Version number of wms leave null to get the default service version

    IUrlPersistentCache persistentCache

    persistent Cache

    string proxyUrl

    proxy url

    ICredentials credentials

    credentials

    Returns
    Type Description
    Task<WFSProvider>
    | Edit this page View Source

    CreateAsync(string, string, string, WFSVersionEnum, IUrlPersistentCache?, string?, ICredentials?)

    Use this Method for initializing this dataprovider with all necessary parameters to gather metadata from 'GetCapabilities' contract.

    Declaration
    public static Task<WFSProvider> CreateAsync(string getCapabilitiesUri, string nsPrefix, string featureType, WFSProvider.WFSVersionEnum wfsVersion, IUrlPersistentCache? persistentCache = null, string? proxyUrl = null, ICredentials? credentials = null)
    Parameters
    Type Name Description
    string getCapabilitiesUri

    The URL for the 'GetCapabilities' request.

    string nsPrefix

    Use an empty string or 'null', if there is no prefix for the featuretype.

    string featureType

    The name of the feature type

    WFSProvider.WFSVersionEnum wfsVersion

    The desired WFS Server version.

    IUrlPersistentCache persistentCache

    persistent Cache Interface

    string proxyUrl

    proxy url

    ICredentials credentials

    credentials

    Returns
    Type Description
    Task<WFSProvider>
    | Edit this page View Source

    Dispose()

    Declaration
    public void Dispose()
    | Edit this page View Source

    ExecuteIntersectionQueryAsync(MRect?)

    Returns all features whose WfsFeatureTypeInfo.BoundingBox intersects 'bbox'.

    Declaration
    public Task<IEnumerable<IFeature>> ExecuteIntersectionQueryAsync(MRect? bbox)
    Parameters
    Type Name Description
    MRect bbox
    Returns
    Type Description
    Task<IEnumerable<IFeature>>

    Features within the specified WfsFeatureTypeInfo.BoundingBox

    | Edit this page View Source

    GetExtent()

    MRect of data set

    Declaration
    public MRect? GetExtent()
    Returns
    Type Description
    MRect

    BoundingBox

    | Edit this page View Source

    GetFeaturesAsync(FetchInfo)

    Gets the features within the specified FetchInfo."/>

    Declaration
    public Task<IEnumerable<IFeature>> GetFeaturesAsync(FetchInfo fetchInfo)
    Parameters
    Type Name Description
    FetchInfo fetchInfo
    Returns
    Type Description
    Task<IEnumerable<IFeature>>
    | Edit this page View Source

    InitAsync()

    Init Async

    Declaration
    public Task InitAsync()
    Returns
    Type Description
    Task

    Implements

    IProvider
    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX