Skip to main content
Question

I have a polygon and I want to find closest line to it.

  • November 25, 2015
  • 1 reply
  • 61 views

Forum|alt.badge.img
I am working on a project where I have set state park buildings and I want to show the closest road to them. I also need to show the distance from each end of the road segments to the building. My plan is to use the geographic neighbor finder to locate closest road. I was planning to use the park buildings as base and the roads file i have as candidates. I just want to know if I am on the right path. By the end of it I want to be able to show the distance from both end nodes of each road segment to the building. I guess that part is confusing me still.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • November 25, 2015
If you have a Unique ID on the roads prior to sending them to the GeographicNeighborFinder, you can then use a matcher or FeatureMerger to identify the only the roads that are closest to a building. Then replace your road segment with the start/end node (CoordinateExtractor, VertexReplacer) and use the GeographicNeighborFinder with the points as Base and Buildings as Candidates.