MapWinGeoProc:Utils ShapefileToGrid2

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy



 static bool ShapefileToGrid(string sfPath, string gridPath, MapWinGIS.GridFileType grFileType, MapWinGIS.GridDataType, 
string sfValueField, double gridCellSize, MapWinGIS.Extents gridExtents, MapWinGIS.ICallback cback)


Convert a shapefile to grid. The number of grid rows and columns is calculated from the specified cell size and the Extents bounding box object.


sfPath Full path to the shapefile
gridPath Full path to result grid file (the file extension should be .asc, .bgd or .tiff depending on the specified grid data type)
grFileType File type of the result grid. Can be Binary, GeoTiff or Ascii
grDataType Data type of the result grid. Can be ShortDataType, LongDataType, FloatDataType or DoubleDataType. Please note that only the FloatDataType is allowed for Binary (.bgd) grid file types.
sfValueField Name of the shapefile field that contains data. It should be a numeric type field.
gridCellSize Cell size of the result grid. The cell (pixel) size should be in the shapefile map units.
gridExtents A MapWinGIS.Extents object specifying maximum and minimum x and y values (bounding box) of the new grid.
cback (Optional) A MapWinGIS.ICallback implementation used for reporting progress and errors. If you don't need to report progress, set this parameter to null.


True if calculation succeeded, false otherwise.

Visual Basic Net 2005 Example Implementation Code
Visual C# 2005 Example Implementation Code

Back to ShapefileToGrid

Retrieved from ""

This page has been accessed 499 times. This page was last modified on 3 March 2008, at 13:36.