User Tools

Site Tools


TGIS_LayerVector.FindFirst(TGIS_Extent, java.lang.String, TGIS_Shape, java.lang.String, bool) method

DK11 for Java | tatukgis.jdk.TGIS_LayerVector.FindFirst | Overloads | Constructors | Fields | Methods | Properties | Events

Finds the first occurrence of an item which meets an extent, query, and additional parameters. Will use RTree if available.

Available also on: Delphi | .NET | ActiveX.


// Java
public TGIS_Shape FindFirst(
  TGIS_Extent _extent,
  java.lang.String _query,
  TGIS_Shape _shape,
  java.lang.String _de9im,
  bool _skipDeleted
// Oxygene
  function FindFirst(
    _extent : TGIS_Extent;
    _query : String;
    _shape : TGIS_Shape;
    _de9im : String;
    _skipDeleted : Boolean
  ) : 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
_query java.lang.String
query which must be matched by item; closely mimics SQL WHERE clause; for examples you can use 'AGE >= 18'; empty (default) means that no items will match.
_shape TGIS_Shape if not nil, then only shapes matched _de9im matrix with _shape will be found
_de9im java.lang.String
DE-9IM matrix of comparison
_skipDeleted bool
set a skip deleted treatment; by default deleted items will be ignored


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.


2020/05/07 01:13

Page Tools