I have generated a road network from open street map data. How can i add start and end coordinates (point_x, point_y) to its attributes table via toolbox or arcpy? That's how the roads look like. I also have the shapefile, but i believe this should be more appropriate, since the junctions i need are already identified.
Use the field calculator. If you have a field (like
start_x), use the field calculator with the expression
!SHAPE!.firstPoint.X, and for a field like
end_x you would use
!SHAPE!.lastPoint.X. for your Y coordinates, you would use
Check out the arcpy geometry documentation(http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-classes/geometry.htm). firstPoint and lastPoint return Point objects, which you can read about here: http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-classes/point.htm
EDIT: you have to use the Python parser, at the top of the field calculator window