This project has moved and is read-only. For the latest updates, please go here.

PostGis Raster

Jul 5, 2014 at 6:28 PM

I want to know if there is support for PostGis Raster in SharpMap ... I know that it has support for PostGis Vector.

Thanks and best regards.

Vladimir J. Arias L.
Jul 7, 2014 at 7:10 AM
I have not tried, but PostGIS raster should be available via GdalRasterImageLayer.
The connection string should be sth like "PG:\"host=xxx, port=yyy dbname=zzz, user=auser, password=apassword\""
The Layername should be the name of the table
If your rastertable is in a special schema, you may need to add that schema to the search path.

Let me know if you have any issues
Jul 9, 2014 at 5:22 AM
Thanks very much, but could you tell me if I'll need native Nuget packages ?? because I test with this ( and doesn't work.

I use:

var rlay = new SharpMap.Layers.GdalRasterLayer("mytable","PG\":dbname=proynav host=localhost user=postgres password=root port=5432 mode=2 schema=public table=mytable\"");

I have references to SharpMap.Extensions, SharpMap, SharpMap.UI that is common.

I'll appreciate your help.
Jul 9, 2014 at 8:05 AM
Edited Jul 9, 2014 at 11:25 AM
Do you get an exception or is the map just blank?
I have played with it a bit, and came to the conclusion that we need a newer GDAL version.
Currently SharpMap relies on GDAL 1.9.2 provided by a nuget package.

Unfortunatly I have no resources what so ever to do this ATM, so if anyone wants to volunteer...
Jul 19, 2014 at 5:52 PM
Hello, I try the following:

var rlay = new SharpMap.Layers.GdalRasterLayer("barranca",@"D:\geo\barranca.tif");

It jumps an exception Type Initializer.

I read the past post and see your comment (

My question is: at present (Sharpmap 1.1) is needed to add GDAL.Native nuget package ??

2014-07-09 2:05 GMT-05:00 FObermaier <[email removed]>:

From: FObermaier

Do you get an exception or is the map just blank?

Read the full discussion online.

To add a post to this discussion, reply to this email ([email removed])

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at