User Tools

Site Tools


Table of Contents

TGIS_LayerVector.LocateEx(TGIS_Point, double, long, double, int, TGIS_Point, double, bool) method

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

Locates a shape (more precise).

Available also on: Delphi | .NET | ActiveX.


// Java
public TGIS_Shape LocateEx(
  TGIS_Point _ptg,
  double _prec,
  long _uid,
  /* ref */ @ValueTypeParameter VarParameter<double> _dist,
  /* ref */ @ValueTypeParameter VarParameter<int> _part,
  /* ref */ @ValueTypeParameter VarParameter<TGIS_Point> _proj,
  /* ref */ @ValueTypeParameter VarParameter<double> _dist_prefer,
  bool _visible
// Oxygene
  function LocateEx(
    _ptg : TGIS_Point;
    _prec : Double;
    _uid : TGIS_Uid;
    var _dist : Double;
    var _part : Integer;
    var _proj : TGIS_Point;
    var _dist_prefer : Double;
    _visible : Boolean
  ) : TGIS_Shape; virtual;


Name Type Description
_ptg TGIS_Point reference point /searching point/ in a layer; if the layer has been attached to the Viewer then expected _ptg units are in a Viewer coordinate space; otherwise expected _ptg units are in a Layer coordinate space
_prec double
precision /not a longer distance than/; point inside a polygon is always not greater than _dist; if _prec is less then 0, then being outside/inside polygon means the same; _prec units are calculated same way as _ptg
_uid long
Uid of reference shape or -1; thanks to this, is possible to find nearest shape, excluding shape given by _uid.
_dist double
reached distance between _pt and shape in Result; for points inside the polygon (if _prec >= 0) the distance will be multiply by 0.95 (to prefer points inside the polygon) but will not be bigger then _prec; for point distance will be multiplied by 0.9 to prefer points over lines and polygons _dist units are calculated same way as _ptg
_part int
number of the part closest to a given point
_proj TGIS_Point point projected to the nearest element of a shape
_dist_prefer double
preferred distance (including shape type priority : points over lines and polygons)
_visible bool
if true the only visible shapes will be evaluated; shapes turned of by query of hidden will be ignored


Type Description
TGIS_Shape Found shape or nil.


Use this method to locate a shape that is near _ptg but also on _prec distance. It finds a shape using FindFirst method in extent corrected by _prec and _ptg params.

If no shape is found on a layer, the searcher takes into account labels registered by the allocator (by extent). In order to disable this behavior, _visible must be set to False.

2020/05/07 01:13

Page Tools