Hello there, here's a question I've looked for on this forum but surprisingly I could not find an answer, so maybe my approach or assumptions aren't right. I've recently imported an osm-file into postgresql for the purpose of geocoding. using the planet_osm_line table I could extract the street names of a particular city. However the lines table contains multiple way-segments/records for one street. I can join the segments into a single line but that does not work in all cases. Is there a way to extract the "real" CenterPoint of a street ? I've created a recusive function to create a table with all connected segments like this:
END $body$ LANGUAGE 'plpgsql' Using the result table I merge all geometry to a single line and use st_line_interpolate_point(way, 0.5) to get the centerpoint ; Using this method it works but the results are not correct???asked 16 Apr '15, 12:46 Eric Bossink edited 16 Apr '15, 14:05 SimonPoole ♦ |