Import from SRTM data

Topics: Data Access
Dec 14, 2014 at 9:22 AM
I'm new to Sharpmap. I've compledted the tutorial OK & can open & display a shape file on my WinForm. I'm wanting to select & open a SRTM data file for manipulation. Is this possible in SharpMap?

Bascially, I want to access the SRTM height datums for each grid point & map the datum to a map height file (binary file) for a game. I'm hoping that SharpMap will give me the utility I need to display the map in reeal time on a form while making some manipulations like overlaid roads, towns etc. Importing SRTM data is the first step for this process.

Also, I'm not familiar with shape files, do they have the resolution of 3-arc secord SRTM DEM's for terrain height?
Dec 15, 2014 at 2:11 PM
I assume you can access SRTM data using GDAL (GdalRasterLayer).
Shapefiles are vector data, so they don't have a resolution.
Dec 20, 2014 at 7:28 AM
Edited Dec 20, 2014 at 7:52 AM
Thankyou. I've added references to the extensions gdal_csharp.dll & gdalconst_csharp.dll & ogr_csharp.dll in my project, but I cannot work out how to create a new GDAL Raster Layer. I'm presuming the syntax to declare a new Gdal raster layer is similar to that below, but I don't get the GdalRasterLayer option attached to Sharpmap.layers.
var SRTMlayer = new SharpMap.Layers.GdalRasterLayer("SRTMlayer","path_to_file"); 
Dec 20, 2014 at 7:35 PM
I've added references to the extensions gdal_csharp.dll & gdalconst_csharp.dll & ogr_csharp.dll in my project
You don't need to do that. Are you compiling SharpMap yourself or are you using NuGet?
For NuGet, you need to install the following packages:

Then you should be able to use GdalRasterLayer without any problems.

Have a look at the WinFormSamples project in the sources section? It has samples for the use of GdalRasterLayers.
Dec 21, 2014 at 1:02 AM
I downloaded sharpmap achive & extracted to its own folder, then added references the Sharpmap.dll & Shaprmap.UI.dll & GEOAPI.dll in my project. All semmed to work OK. I have a program that can load & display a shape file or a BMP file. Then I downloaded the extensions archive & extracted that to it's own folder & added references to the gdal_csharp.dll & gdalconst_csharp.dll & ogr_csharp.dll in my project (same as I did for sharpmap). No referencing errors in the project referencing tab, but GdalRasterLayer is not available as a method of the SharpMap.Layers object. Did I do something wrong?
Dec 23, 2014 at 9:42 AM
You need to reference SharpMap.Extensions to get GdalRasterLayer.