MapWinGeoProc:Utils ShapefileToGrid1

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.ICallback cback)


Convert a shapefile to grid. The resulting grid will have the same extents as the shapefile. The number of resulting grid columns and rows is calculated from the shapefile extents and the specified cell size.


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.
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 489 times. This page was last modified on 2 March 2008, at 15:28.