## TatukGIS Developer Kernel 11

### Site Tools

api:dk11:activex:tatukgis_xdk11.itgis_layervector.locateex_itgis_point_double_olevariant_double_integer_itgis_point

# ITGIS_LayerVector.LocateEx method

Locates a shape (more precise).

Available also on: Delphi | .NET | Java.

## Syntax

```// C#
public ITGIS_Shape LocateEx(
ITGIS_Point _ptg,
double _prec,
OleVariant _uid,
ref double _dist,
ref int _part,
ref ITGIS_Point _proj
);```
```' VisualBasic
Public Function LocateEx(
ByVal _ptg As ITGIS_Point,
ByVal _prec As Double,
ByVal _uid As OleVariant,
ByRef _dist As Double,
ByRef _part As Integer,
ByRef _proj As ITGIS_Point
) As ITGIS_Shape```
```// Oxygene
public
function LocateEx(
_ptg : ITGIS_Point;
_prec : Double;
_uid : OleVariant;
var _dist : Double;
var _part : Integer;
var _proj : ITGIS_Point
) : ITGIS_Shape;```

## Parameters

Name Type Description
_ptg ITGIS_Point reference point /searching point/ 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
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 OleVariant Uid of reference shape or -1; thanks to this, is possible to find nearest shape, excluding shape given by _uid.
_dist double
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
Integer
number of the part closest to a given point
_proj ITGIS_Point point projected to the nearest element of a shape

## Result

Type Description
ITGIS_Shape Found shape or nil.

## Remarks

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.

See Locate for example.

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:04

### Page Tools
{"ft_lang_label":"__label__en","ft_lang_prob":0.7771999,"math_prob":0.8114338,"size":2173,"snap":"2021-21-2021-25","text_gpt3_token_len":552,"char_repetition_ratio":0.12863071,"word_repetition_ratio":0.028169014,"special_character_ratio":0.24298206,"punctuation_ratio":0.11989796,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9569157,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-05-09T04:55:31Z\",\"WARC-Record-ID\":\"<urn:uuid:63e7636e-5687-41fb-a044-eba01765648b>\",\"Content-Length\":\"18561\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:bd6e61f6-3ccf-47cb-b3c9-ebb233c3e498>\",\"WARC-Concurrent-To\":\"<urn:uuid:351d7a7f-a2be-4f76-bebb-9e9a3eb6f755>\",\"WARC-IP-Address\":\"5.226.122.201\",\"WARC-Target-URI\":\"https://docs.tatukgis.com/DK11/api:dk11:activex:tatukgis_xdk11.itgis_layervector.locateex_itgis_point_double_olevariant_double_integer_itgis_point\",\"WARC-Payload-Digest\":\"sha1:FJVQC2WNRK6ODMQPWIVQMJFD536TFB5W\",\"WARC-Block-Digest\":\"sha1:DRENPAUXMU5RE5NCHQQLU6DJSEGJPZ37\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-21/CC-MAIN-2021-21_segments_1620243988955.89_warc_CC-MAIN-20210509032519-20210509062519-00041.warc.gz\"}"}