MapWindow6:Examples:IntRasterDataProvider
From MapWindow GIS
Integer Raster Data Provider
This walkthrough has a few basic steps. The first step is to set up a test project with a dependency to MapWindow with a map control and a MenuStrip. This will actually display the data format when we are done creating the provider.
Setup a new project with a dependency to MapWindow and add a map.
Next, you will create a class that can read and write integer rasters from some datatype. Much of the programming has been done in the MapWindow.Data.IntRaster class, so we won't be repeating all that code, but rather re-using it by inheriting the IntRaster class for this example. As long as you implement the MapWindow.Data.IRaster interface, however, the raster provided by your method will be perfectly valid, so you are not required to inherit the IntRaster class. The file-handling that is specific to a data provider needs to be written by the provider. Methods that you want to support file handling will have to be overridden.
Authoring the Integer Raster Class itself
The third step is writing the data provider itself. Basically in order for your project to add the data you have to create a class that is responsible for telling MapWindow that you wish to be able to create an IRaster, the dialog filter for your data type (this should be as specific as possible) and a few extra properties.
Finally, in the last step, you will add your new provider to the MapWindow.Components.DataManager.DefaultDataManager.
