I want to create points to represent lines from a line layer. This is similar to creating points to represent polygons. Does anyone have an idea on any useful plugin or the best way to do this?enter image description here

  • 1
    I'm assuming that when you talk about "creating points to represent polygons", you mean calculating the centroids of polygons. There really isn't an analogous formula for lines/polylines ... How would you want to derive a single point from a line? Would you use the midpoint of the line? Could you share a little more detail on what you're trying to do with the points you want to reduce the street to? – J. Taylor Dec 17 '15 at 6:01
  • Hi, i am trying to create points to represent each line in the layer. The line can be created on or along the line. – mapperx Dec 17 '15 at 6:37
  • 1
  • Please use the edit button beneath your question to revise it with any requested clarifications. In this instance I suspect a diagram will make what you are trying to ask much clearer. – PolyGeo Dec 17 '15 at 6:46
  • What I think you should look for is a tool that converts a line feature to its a point feature at its midpoint, while retaining its attributes. – PolyGeo Dec 17 '15 at 8:12

I have found a suitable solution to the question I asked earlier. To do this I used the Convert Geometry Type function from MMQGIS plugin (the plugin must be installed). MMQGIS → Modify → Convert Geometry Type From the window I chose the layer(line type) and chose New Geometry Type (this has several options) I used Centroid and selected the Output Shapefile. The result is a shapefile of the centre points of all the lines with all the attributes from the original file. (Point to note, if a line is curved, the centre point will not appear close to the line).

Screenshot of result

Using the QChainage option creates points at the ends of the line, this is not what i wanted. Below is a screenshot comparing the result using MMQGIS the green points and QChainge the red pointsComparing points from MMQGIS and QChainage

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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