User Tools

Site Tools


ITGIS_GridToPolygon interface

DK11 for ActiveX | TatukGIS_XDK11.ITGIS_GridToPolygon | Interfaces | Methods | Properties

Class that enables grid to vector (polygon) conversion.

Available also on: Delphi | .NET | Java | ActiveX.


// C#
public interface ITGIS_GridToPolygon: ITGIS_GridToVectorAbstract
' VisualBasic
Public Interface ITGIS_GridToPolygon
  Implements ITGIS_GridToVectorAbstract
End Class
// Oxygene
  ITGIS_GridToPolygon = public interface( ITGIS_GridToVectorAbstract )



Inherited Overrides Protected
Name Visibility Description
AttachDelphiObj public Only for internal use of TatukGIS.
(Inherited from ITBaseObject)
DelphiObj public Only for internal use of TatukGIS.
(Inherited from ITBaseObject)
Generate public Creates vector shapes from a grid layer.
(Inherited from ITGIS_GridToVectorAbstract)


Inherited Protected
Name Visibility Description
IgnoreNoData public If true (default), cells of NoData is ommitted.
(Inherited from ITGIS_GridToVectorAbstract)
SplitShapes public If True (default), single-part polygon shapes are created; otherwise multipart shapes are created.
Tolerance public A minimum distinguishing value of the grid cells.
(Inherited from ITGIS_GridToVectorAbstract)


This class creates polygon shapes from connected regions of grid cells sharing the same value.

This value is determined taking into account the Tolerance parameter to avoid a problem with distinguishing floating-point cell values. For example, if Tolerance=0.1, then cell values of 0.123 and 0.111 are considered the same because they are both rounded to 0.1. A cell value of 0.211 is rounded to 0.2 and treated as in different region.

The vectorizing functionality was originally designed to use with classified grid layers, but the Tolerance property extends use of this function to all grid layers, e.g., digital elevation model (DEM) and other grids with continuous data.

Cell values extracted from a grid layer are used to create attribute information for the resultant vector layer.

The following figures illustrates how the input land cover grid data layer is converted to a polygon vector layer.

Land cover grid layer (input) Created vector layer (output)

Data source: © European Union, Copernicus Land Monitoring Service 2018, European Environment Agency (EEA)



  // assume we have a grid layer 'lp'
  // and a vector layer 'lv' with added attribute field 'value'
  // create an instance of TGIS_GridToPolygon class
  polygonizer = TGIS_GridToPolygon.Create;
  // run algorithm
  polygonizer.Generate(lp, lv, 'value');

2021/12/07 08:38

Page Tools