SHP 2 Grid
SHP 2 Grid
1.1
Software Requirements
The plugin requires MapWindow GIS software which can run on Microsoft Windows operating system (98, 2000, XP, Vista). This plug-in has been tested with MapWindow 4.4 and 4.5. Speed of computation depends on computer memory and the size and complexity of the processed shapefile.
1.2
Installation
Copy the file ShapefileToGrid.dll to the MapWindow\Plugins\ directory. This directory is often located in C:\Program Files\MapWindow\Bin\Plugins
1.3
1) Grid Cell Size This is the size of the grid square pixel. Currently, only square pixels are supported. The Grid cell size should be in the same units as the current map units. The current map units are specified by the current project projection. In most cases, the units are meters. There are two options how to choose the grid cell size: a) Same as an existing grid this option is only enabled if there is a grid layer loaded in MapWindow. Choose this option when you want to overlay the newly created grid with an existing grid in your future analysis. b) As specified below Enter the cell size of the new grid. The cell (grid pixel) size should be in the map units of the current project.
2) Grid Extent The grid extent is defined by the Y and Y coordinates of the upper right and lower left corner of the grid. Depending on the number of layers displayed in the current MapWindow project, there will one or more options how to choose the grid extent: a) Same as an existing shapefile or grid This option is enabled if there is a shapefile of a grid layer loaded in MapWindow. When chosing this option, the maximum and minimum X and Y values of the new grid will be the same as the maximum and minimum X and Y values of the selected grid or shapefile. b) As specified below This is the last option in the list. Enter the minimum X, maximum X, minimum Y and maximum Y of the new grid.
Select grid extent user specified values 3) Grid Data Type Four different data types can be selected: ShortDataType (Short integer, 2 Bytes), LongDataType (Long integer, 4 Bytes), FloatDataType (floating-point precision, 4 Bytes) and DoubleDataType (double precision, 8 Bytes). The selection of grid data type will affect the size of the resulting grid file. 4) Grid File Type Supported output grid formats are ASCII Grid (text file), USU Binary grid and GeoTiff (binary files). For a detailed description of the formats, please see the following links: ASCII Grid (.txt, .asc) http://en.wikipedia.org/wiki/ESRI_grid#ASCII GeoTiff (.tiff) http://geotiff.maptools.org/spec/contents.html USU Binary (.bgd) This is a binary grid format used by MapWindow. For format description, see http://www.mapwindow.org/phorum/read.php?4,8597,8615#msg-8615 5) Grid file name Use the (Browse..) button to choose the path and file name of the new grid. After chosing the file name, click the Finish button on the main form. A message showing selected result grid properties will be displayed and calculation will start.
Choose Yes if you want to add the new grid to the map in the current project. If you want to display it later, choose No.
1.4
The Shapefile to Grid plugin uses the Scanline polygon fill algorithm for rasterizing polygons and the Bresenham line algorithm for rasterizing lines. For more information about the scanline algorithm, go to http://www.cs.rit.edu/~icss571/filling/ (Polygon fill teaching tool, department of computer sciences, Rochester Institute of Technology) For more information about the Bresenham http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm algorithm, see
1.5
The original source code of the plugin (polygon rasterization) was written by Enrico Chiaradia (UNIMI, Italy). It was modified by Ji Kadlec (Czech Republic) who added line rasterization and created the user interface. For more information, error reports or improvement suggestions, please contact Ji Kadlec at [email protected].
1.6
License
The "Shapefile to grid" plugin is free software. The software binary file and source code are subject to the Mozilla Public License Version 1.1 (the "License"); You may not use this software except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.