I am currently experimenting with Geoserver and it's capabilities within C#. One thing I would like to do is query the server for basic information (existing workspaces, layers, layer attributes, etc...)

I noticed that Geoserver does have a REST implementation, but is there a C# implementation for consuming this service? I am sure a library could easily be written, but I would hate to re-invent the wheel if one already exists. Thank you!


This can be done using C# WebRequests. However, what I would have created is a C# library for consuming the Geoserver REST implementation. It seems like something many people would use. Another way to ask the question would be, "Does a library full of C# WebRequests exist to consume Geoserver's REST implementation?"

It is much easier if a library already exists with classes such as these to consume the webservice, than it is to create an entire library. For Example:

var geoserver = new Geoserver("http://localhost:8080/geoserver/web");
var workSpaces = geoserver.Workspaces;
var layer = geoserver.Workspaces[0].Layers["Foo"];

The above code is the type of implementation I would really enjoy. If I was to create a library that consumed the Geoserver REST service. The above is what I would create for myself to use. If it wasn't created already, I would likely make an opensource project that others could use as well. So that in the future, if someone is wanting a library to easily consume the Geoserver service, they can contribute and use the one that already exists! :)

  • 1
    Why do you need an API? If it's a simple REST (url-based) API that you need to hit, then you could use a WebRequest object to request msdn.microsoft.com/en-us/library/456dfw4f or submit msdn.microsoft.com/en-us/library/debx8sh9 data
    – Vadim
    Jul 16 '12 at 16:43
  • 1
    @Vadim Yes, this can be done. See Edit. I am trying not to re-invent the wheel.
    – jsmith
    Jul 16 '12 at 17:04
  • 2
    Ask yourself this, do you know of an API to call ANY web services? No, because the web service IS THE API. What you might want to consider asking is: how do I generate proxy classes from Geoserver web services?
    – CaptDragon
    Jul 16 '12 at 17:08
  • 4
    I think it is a perfectly reasonable question to ask whether a .NET wrapper library exists for the Geoserver API. It does not seem to be the case though. If you are willing to implement it yourself and share your work, I suggest that you put it on GitHub. Other people might contribute to your project easily.
    – Petr Krebs
    Jul 16 '12 at 20:38
  • 2
    +1 I agree with @PetrKrebs . It would be interesting to see wrappers that leverage async and await introduced in C# 5. Jul 17 '12 at 12:44

I haven't tested the library, but the GSRCC library looks promising place to start: https://code.google.com/p/gsrcc/

The GSRCC library is a C#.net Client to the Geoserver 2.1.x+ RESTful configuration extension. Using this library, one can access a remote Geoserver via HTTP and configure it.

The REST extension of Geoserver has to be installed on Geoserver.

This project uses .net framework 4.0 and has no extra dependencies!

This is a conversion from the http://code.google.com/p/gsrcj/, which is a Java Api. Since there was no C# .net API for accessing the REST Api for Geoserver.

The first version aims to implement the same thing in the java version, and latter to implement the full rest api.


I use RESTSHARP for communicating with many REST web services. Makes everything a lot easier.

  • I like RESTSHARP as well. If I do have to implement this myself, it is what I will be using to implement it.
    – jsmith
    Jul 16 '12 at 17:22
  • To add to what I am asking. I am not after a library that helps consume REST services. I am asking for a library that has been written as a wrapper to consume specifically geoserver REST services.
    – jsmith
    Jul 16 '12 at 17:34
  • 1
    That is, something like code.google.com/p/geoserver-manager, which is for Java, and there are equivalents for Python and Ruby, but to my knowledge, nothing for C# Jul 16 '12 at 18:59

I think it is a perfectly reasonable question to ask, no-one wants to reinvent the wheel. I had a similar requirement on a project and I too could not find a C# assembly that would make working with GeoServer easier.

In the end I created a class within my project to simplify the REST calls to/from GeoServer but it was specifically tuned to my needs. I would happily contribute to an Open Source project to create a C# management assembly for GeoServer.

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.