User Tools

Site Tools


Table of Contents

ITGIS_LayerPixel.Loop_8 method

DK11 for ActiveX | TatukGIS_XDK11.ITGIS_LayerPixel.Loop_8 | Methods | Properties

Prepares enumerator to iterate the layer (pixels are treated as points).

Available also on: Delphi | .NET | Java.


// C#
public ITGIS_LayerPixelEnumeratorFactory Loop_8(
  ITGIS_Extent _extent,
  double _pixelsize,
  ITGIS_Shape _shape,
  WideString _de9im,
  int _band,
  WordBool _writable
' VisualBasic
Public Function Loop_8(
  ByVal _extent As ITGIS_Extent,
  ByVal _pixelsize As Double,
  ByVal _shape As ITGIS_Shape,
  ByVal _de9im As WideString,
  ByVal _band As Integer,
  ByVal _writable As WordBool
) As ITGIS_LayerPixelEnumeratorFactory
// Oxygene
  function Loop_8(
    _extent : ITGIS_Extent;
    _pixelsize : Double;
    _shape : ITGIS_Shape;
    _de9im : WideString;
    _band : Integer;
    _writable : WordBool
  ) : ITGIS_LayerPixelEnumeratorFactory;


Name Type Description
_extent ITGIS_Extent extent of items to be found; expected _extent units are in a Layer coordinate space
_pixelsize double
minimum requested size of image pixel; by providing 0 a maximum possible resolution will be used, which is also a fastest method if a layer is full in-memory because in such situation a pointer to existing memory will be used
_shape ITGIS_Shape if not nil, then only pixels matching _de9im matrix with be found;
_de9im WideString DE-9IM matrix of comparison
_band int
band specification
  1. 0 - if default Loop must be used; in such bands are interpreted as image or grid depends or layer; Color or Value are filled accordingly
  2. number of specific band; in such situation only Bands property is filled
  3. -1 - all bands are retrieved; only Bands property is filled
_writable WordBool if true than layer will post back any changes in locked area; if write is not possible then TGIS_PixelItem.Writable will be set accordingly


Type Description
ITGIS_LayerPixelEnumeratorFactory Pixel item returned row by row, column by column.



By providing _pixelsize=0, a native layer resolution is requested. This is also the fastest method if a layer is fully in-memory because, in such situation, a pointer to existing memory is used


General way to query for terrain profile:

foreach (TatukGIS.NDK.TGIS_PixelItem px in lp.Loop(0, line, false))
    String.Format("Distance: {0}, Height:{1}\r\n", px.Distance, px.Value)

General way to query for pixels within polygon and modifying value:

foreach (TGIS_PixelItem px in lp.Loop(polygon.Extent, 0, polygon, "T", true))
  px.Color = TGIS_Color.Red;
2020/05/07 01:04

Page Tools