Skip to content
This repository contains a .NET WPS client for ArcGIS Pro.
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
media
src/Wps
.gitattributes
.gitignore
LICENSE
README.md

README.md

WPS.NET

DescriptionInstallationUsageLicense

WPS.NET

Description

This project was created initially during the 2019th GSoC.

Its purpose is mainly to allow users to integrate the WPS standard in their program seamlessly without having to reimplement the specification every time. The library was built in C# to integrate with the .NET ecosystem. It is easily extensible and featureful providing the users the two main implementation of execution types, synchronous and asynchronous.

Installation

You can get the package from NuGet.

.NET CLI

dotnet add package WPS.NET

Packet Manager

Install-Package WPS.NET

Usage

Getting the server capabilities

var client = new WpsClient(httpClient, xmlSerializer);
var capabilities = await client.GetCapabilities("server.uri");

Describing a process

var client = new WpsClient(httpClient, xmlSerializer);
var processOfferings = await client.DescribeProcess("server.uri", "process identifier");

Creating a request

var request = new ExecuteRequest
{
    Identifier = "process identifier",
    Inputs = new[]
    {
        new DataInput
        {
            Identifier = "input identifier",
            Data = new LiteralDataValue{ Value = "test" }
        }
    },
    Outputs = new[]
    {
        new DataOutput
        {
            Identifier = "output identifier"
        }
    },
    ExecutionMode = ExecutionMode.Synchronous,
    ResponseType = ResponseType.Raw
};

Executing a request

var client = new WpsClient(httpClient, xmlSerializer);
var session = await client.AsyncGetDocumentResultAs<YourResultDataType>("server.uri", request);

var pollingTask = session.StartPolling();
session.Finished += (sender, args) => { /* Use the result here. */ };
session.Failed += (sender, args) => { /* The execution has failed. */ };
session.Polled += (sender, args) => { /* The sesssion poller has checked for the status. */ };

License

Apache v2.0

You can’t perform that action at this time.