I have a point feature class and for each point I want to find the nearest vertex on a polyline feature class. I then want to create a line between each point and it's nearest vertex on the other layer.
How is this done?
If it can't be done with a polyline layer, I can also use a point layer in lieu.
-
This can easily be done in python if you are comfortable with itBarbarossa– Barbarossa2014年01月17日 18:46:15 +00:00Commented Jan 17, 2014 at 18:46
2 Answers 2
You can convert your line vertices to points using Feature Vertices To Points. Then using the Near tool, you can find the nearest vertex for each point. As for creating new polylines from these points, use the tool: XY to line.
-
2there are also 2 tools to create lines XY to line(management) and Point to line(managementàradouxju– radouxju2014年01月17日 19:38:35 +00:00Commented Jan 17, 2014 at 19:38
-
The solution required first conducting a Near Analysis. In that, "location" was checked to create XY coordinates for the nearest locations on the network. I also calculated the XY coordinates of all the points in my original point layer. Then I used XY to line and specified the start and end XY coordinates. This gave me a new feature class of lines. Thanks for all the help!David Giacomin– David Giacomin2014年01月17日 21:13:32 +00:00Commented Jan 17, 2014 at 21:13
As mentioned in the comment above, you can use python to easily accomplish this task, or if you are not comfortable with that, you can do a NEAR analysis - which will find the nearest point on a line to each point in your dataset. Unfortunatly, this nearest point will not necesarily be a vertex on the line. In order to do this, you could convert the line to point features first - using the FeatureVerticiestoPoints tool, then do the near - this will give you a list of nearest points - which you can extract the X,Y coorindates for, and then build your line from that. Hopefully this all makes sense.
Explore related questions
See similar questions with these tags.