May 22, 2009 at 9:31 AM
Edited May 22, 2009 at 9:34 AM
Hi havitetty, it is certainly not the most efficient way but, you could start by:
taking your input coordinate,
creating a BoundingBox around it, the size of your acceptable margin of error (or in the worst case the size of the dataset),
querying the shapefile by calling ExecuteIntersectionQuery on the shapefile provider and passing in the BoundingBox,
iterating through the results, measuring and minimizing the distance between the result and the input coordinate i.e store the nearest result and overwrite it as nearer ones are found.
if no results were found then you can either increase your bounding box and requery or decide that the result is too inacurate and return null
but personally I would put the dataset in a spatially enabled database where you could minimize the distances within the query.