api:dk11:activex:tatukgis_xdk11.itgis_layervector.locateex_itgis_point_double_olevariant_double_integer_itgis_point

DK11 for ActiveX
| TatukGIS_XDK11.ITGIS_LayerVector.**LocateEx**
| Methods
| Properties

Locates a shape (more precise).

// 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;

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 |

Type | Description |
---|---|

ITGIS_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.

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.

2022/11/16 01:10