I am creating an application (C#) and I want to connect it to GRASS, mainly run grass scripts from my application.

This might seem to be a repeated question however I am thinking of the possibility that I will no longer open GRASS explicitly (double click the application and the GUI will pop-out). Also I know that GRASS can create PNG images but can grass do this too without being ran? I really need GRASS to be hidden from the view so that it would be neat. BTW I know that ofcourse GRASS would still be needed to be installed in the PC and not completely remove it.

Are there any available tutorials other than the one on the wiki page? Or a sample code?

1 Answer 1


You could use MapServer to generate map images from GRASS layers - http://grass.osgeo.org/wiki/GRASS_and_MapServer and Link

MapServer also has C# bindings which may be of interest to you for manipulating a dataset further see - http://mapserver.org/installation/dotnet.html

Precompiled versions of MapServer and C# bindings are available at http://vbkto.dyndns.org/sdk/

If taking this approach you may find you can use GDAL to do many of the functions in GRASS, so you may not need GRASS at all.

I am not sure how this approach would work for complex dynamically generated images. You could look at the GRASS web services which would give you independence from the desktop package - http://grass.osgeo.org/screenshots/web.php

  • I'm not doing an online application. I am intending to use this offline without the need of a webserver. :)
    – teamAngat
    Feb 20, 2011 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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