User Tools

Site Tools


TGIS_LayerVector.FindFirst(TGIS_Extent) method

DK11 for .NET | TatukGIS.NDK.TGIS_LayerVector.FindFirst | Overloads | Constructors | Fields | Methods | Properties | Events

Finds the first occurrence of an item which meets an extent. Will use RTree if available.

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


// C#
public virtual TGIS_Shape FindFirst(
  TGIS_Extent _extent
' VisualBasic
Public Overridable Function FindFirst(
  ByVal _extent As TGIS_Extent
) As TGIS_Shape
// Oxygene
  function FindFirst(
    _extent : TGIS_Extent
  ) : TGIS_Shape; virtual;


Name Type Description
_extent TGIS_Extent extent of items to be found; the layer has been attached to the Viewer then expected _extent units are in a Viewer coordinate space; otherwise expected _extent units are in a Layer coordinate space


Type Description
TGIS_Shape Shape itself or nil.


See: FindNext

Use this method to find to the first shape in the layer matching given criteria. Using _query param we can narrow the result of the shape searching down to the minimum. This should speed up our process of locating a desired shape.

To locate a shape, simply choose an existing layer and use FindFirst method of with a proper extent and a SQL query as a WHERE clause.


2022/11/16 01:34

Page Tools