Question

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

  • 25 November 2015
  • 1 reply
  • 2 views

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

1 reply

Badge +22
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.

Reply