2

My question is similar to Merging points (bus stops) in QGIS manually or programmatically?, but it's not answered sufficiently

I have OSM-transit data with bus stops. Some stops have two or more bays for different directions. In this example, the stop 'Steinerstraße' has two points: Steinerstraße has two points

I want to merge all points belonging to one stop to one point. I assume that they can be identified by an identical name in the 'name'-column of the attribute table.

Best case would be to create a new point in the middle of the points, however, I'd be satisfied with a simple deletion of the 2nd feature as well.

Can anyone give me a hint how to do it?

I've never used either python nor SQL in a GIS-environment and would prefer a GUI-based solution. However, I'm open for everything (some xp in python and SQL in other contexts).

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jan 26, 2015 at 17:23

1 Answer 1

2

Not an easy task, but this way it works for me:

  1. Load the point layer into QGIS (supposed to be in EPSG:900913, else reproject it to any projected CRS)
  2. make a copy of the layer
  3. Install the MMQGIS plugin
  4. From the Plugins menu, choose Create Hublines. Select your two layers, and the name attribute for both as ID.

After executing, all busstops with the same name are connected with lines. Unfortunately, the points are also connected to themselves, leading to lines of zero length. So:

  1. Select the hub layer and use Vector -> Geoprocessing -> Dissolve with the name field as Dissolve field, to a new file
  2. Use Vector -> Geoprocessing -> Buffer to create a buffer of 5 (meters) in a new layer
  3. Use Vector -> Geometry Tools -> Polygon centroids to create single points from the buffer polygons

As you can see, it works for single and multiple bus stops: enter image description here

  1. remove all previous layers
answered Jan 26, 2015 at 19:02
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.