Reputation: 21
I work in GIS with VBA. I have a geometric network that contains 2 layer River (polyline) and Hydrometry station (Point). I want to find the closest Point to the selected River, but I want that distance to be measured on the network, not the direct distance.
How can I code this in VBA?
Upvotes: 2
Views: 349
Reputation: 65854
It's hard to answer your question because you don't describe your "geometric network" in any detail, but the Floyd–Warshall algorithm will find all distances in the network between points on the river and points at hydrometry stations.
Wikipedia has links to implementations in many languages; there should be no difficulty in adapting one to VBA.
Upvotes: 1