9

I'm currently working on a WFS client-side implementation in C# for a thick client application (Windows desktop application). The goal is to be able to choose some "layer" combinations to be shown overlaid on a map. The rendering will use existing function calls in the thick client. The C# / .NET requirement is pretty firm.

At this stage I'm looking at using standard .NET function calls to make HTTP GET calls to GetCapabilities, standard XmlReader to parse the capabilities, build an abstraction of that, then make more HTTP calls based on attributes from that abstraction. Its not that hard (probably because I haven't got to the GML parser part yet...) but I wondered if there might be a better way. In particular, I'm concerned that my client might work for some servers and not others (based on some experiences implementing WMTS in OWSlib).

I wondered if anyone knew of a reasonably "alive" open source product / project that can provide a C# abstraction for WFS on the client side.

There have been similar questions (in particular Connect to Web Feature Service using python/C#, which has a pretty rubbish answer with some nice follow-up banter; but its not very specific in its requirements) and some that looked superficially similar, but dealt with server side implementation or were actually for an admin aspect (e.g. GeoServer REST).

The nice people at Mass GIS have made available a C# connector, which is basically what I'm looking for, but it hasn't been updated in a long time (2007, by the looks). An ongoing project based on that would be interesting.

I'd prefer something that didn't "bundle" the rendering part (to make the final part a bit "lighter"), but if it wasn't that hard to extract, it might be interesting too.

In the ideal world, there would be OWSLib for C#.

9
+150

It looks like I found your holy grail!

SharpMap has a WFS implementation.

Code here: https://github.com/SharpMap/SharpMap/blob/master/SharpMap/Data/Providers/WFSClient.cs

Main web page here: https://github.com/SharpMap/SharpMap.

If I were you, I'd use that as much as I could. It'll save you doing all the tedious implementation stuff...

3

Maybe you also can use Mapsui. It is based on a modified version of SharpMap.

http://mapsui.codeplex.com/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.