DK for .NET | TatukGIS.NDK.TGIS_LayerPixel.Loop | Overloads | Constructors | Fields | Methods | Properties | Events
Prepares an enumerator to iterate the layer with pixels treated as points.
// C# public virtual TGIS_LayerPixelEnumeratorFactory Loop( TGIS_Extent _extent, double _pixelsize, TGIS_Shape _shape, string _de9im, bool _writable );
' VisualBasic Public Overridable Function Loop( ByVal _extent As TGIS_Extent, ByVal _pixelsize As Double, ByVal _shape As TGIS_Shape, ByVal _de9im As String, ByVal _writable As Boolean ) As TGIS_LayerPixelEnumeratorFactory
// Oxygene public function Loop( _extent : TGIS_Extent; _pixelsize : Double; _shape : TGIS_Shape; _de9im : String; _writable : Boolean ) : TGIS_LayerPixelEnumeratorFactory; virtual;
| Name | Type | Description |
|---|---|---|
| _extent | TGIS_Extent | extent of items to be found; _extent units are expected to be in the layer coordinate space |
| _pixelsize | double Double | minimum requested image pixel size; if 0 then the maximum possible resolution is used. This is also the fastest mode for fully in-memory layers because existing memory is used directly |
| _shape | TGIS_Shape | if not nil then only pixels matching the _de9im matrix are found |
| _de9im | string String | DE-9IM (Dimensionally Extended Nine-Intersection Model) comparison matrix |
| _writable | bool Boolean | if True then the layer posts back changes made through TGIS_PixelItem; if writing is not possible then TGIS_PixelItem.Writable is set accordingly |
| Type | Description |
|---|---|
| TGIS_LayerPixelEnumeratorFactory | pixel items returned row by row, column by column |
_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
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; }