MapWinGeoProc:Utils ShapefileToGrid3

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, MapWinGIS.GridHeader grdHd, MapWinGIS.ICallback cback)


Convert a shapefile to a grid. The resulting grid extents and cell size are specified by the GridHeader 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.
grdHd A MapWinGIS.GridHeader object where the number of rows, and columns, minimum x and y coordinates, cell size and no data value are specified. To obtain a header object from an existing grid, use the GridHeader.CopyFrom() method.
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 438 times. This page was last modified on 3 March 2008, at 13:50.