|
Description
VECQueryNearest() is used to fetch the nearest shape to a given 2D location.
Call Signature
int VECQueryNearest ( int/string filespec, int segment_num, Vertex ptr location [, int ptr search_list [, int list_count ] )
Return Value
int
The shape number of the nearest shape or -1 if the search fails.
Arguments
int/string filespec:
This can either be the handle returned by DBOpen(), or the name of an open file.
int segment_num:
The vector layer (segment) number being accessed.
Vertex ptr location:
The point to search from.
[ int ptr search_list ]:
An optional array of integer shape id's to restrict this search to. If not provided, all shapes are tested.
[ int list_count ]:
An optional count of the number of shape id's in the search_list. If not provided, it is assumed that the entire search_list array should be used.
Remarks
The search fails if no shapes in the layer have vertices or if there are no shapes in the layer.
See also
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.