Normally we have two shapefiles, Point and Polyline. We then populate my polyline layer with the point data ID where the lines start to where they end; eg. create two columns (from and to).

However in a GIS system representing electrical network, we have only one shapefile Polyline. No shapefile for Points. How can we generate and populate shapefile for points.

X and Y coordinates are available for start node and end node.

However in case of two line segments of a polyline, the common point / joint should have should be represented by a single point only. How can we generate and populate point shapefile and establish two columns in polyline with IDs of two points ?

  • What GIS software are you using?
    – PolyGeo
    Commented Aug 4, 2016 at 1:18
  • I am using QGIS
    – user80158
    Commented Aug 4, 2016 at 5:14

2 Answers 2


In QGIS you can use the 'Locate Points along lines' Plugin. enter image description here

Run the tool, add your line layer and check the 'endpoints' option to get only the starting and ending nodes.

enter image description here

And you should get a new shapefile with only the starting and ending nodes. enter image description here

  • It worked well. However can we add the node ID for Start Node as well as End node as two attributes to the polyline ? say two columns with heading FromNodeID and ToNodeID ?
    – user80158
    Commented Aug 4, 2016 at 16:55
  • If you check the 'keep attributes' option in the tool, the resulting nodes will have all the attributes of the original polylines, including the id. You can then use the id to run a join on the attributes of the polylines and nodes and add the columns as you see fit. Commented Aug 5, 2016 at 5:28

If you have the x,y coordinates for your nodes, which you suggest you have, place them in a spreadsheet with 3 columns: x,y, node type. In ArcGis: Create an xy event layer and then export this data to a shapefile.

  • But how do I establish common point ID in case of two series line segments ? Can we establish connectivity other than proximity of x,y coordinates ? Some line lengths can be very small, say less than one meter.
    – user80158
    Commented Aug 4, 2016 at 5:22
  • Can you post an example of your data? Commented Aug 4, 2016 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.