User Tools

Site Tools


api:dk11:activex:tatukgis_xdk11.itgis_layerpixel.loop_2_itgis_extent_double_wordbool

Table of Contents

ITGIS_LayerPixel.Loop_2 method

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

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

Available also on: Delphi | .NET | Java.

Syntax

// C#
public ITGIS_LayerPixelEnumeratorFactory Loop_2(
  ITGIS_Extent _extent,
  double _pixelsize,
  WordBool _writable
);
' VisualBasic
Public Function Loop_2(
  ByVal _extent As ITGIS_Extent,
  ByVal _pixelsize As Double,
  ByVal _writable As WordBool
) As ITGIS_LayerPixelEnumeratorFactory
// Oxygene
public
  function Loop_2(
    _extent : ITGIS_Extent;
    _pixelsize : Double;
    _writable : WordBool
  ) : ITGIS_LayerPixelEnumeratorFactory;

Parameters

Name Type Description
_extent ITGIS_Extent extent of items to be found; expected _extent units are in the Layer coordinate space
_pixelsize double
Double
minimum requested size of image pixel; by providing 0, the maximum possible resolution will be used, which is also the fastest method if a layer is fully in-memory because, in such situation, a pointer to existing memory is used
_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

Result

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

Remarks

_pixelsize

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

Example

General way to query for terrain profile:

foreach (TatukGIS.NDK.TGIS_PixelItem px in lp.Loop(0, line, false))
{
  Memo.AppendText(
    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