This may be a very generic question but I cannot find a starting point.

I want to convert a line (MultilineString or any other implementation) to It's OSM Edge Id(Segment Id) list.

Can anyone tell me how to do that in QGIS?


I am not sure about a simple way to do it in Qgis.

You have a tool called "explode lines" in Geotraitment toolbox, this tool will return each segment of your lines and with some spatial query you can retrieve id for each segment.

There is maybe some plugins also that i am not aware of it.

But I could propose a rather good solution with the use of Postgres which offer a lot more geospatial tools and traitment. You have to :

  1. Install Postgres and Postgis on local on your PC
  2. Import your shapefile in a local database
  3. and then you can run this kind of traitment as linked in this post :

In PostGIS: how to split linestrings into their individual segments?

I understand it could look like an overkill for this simple task but if you have other geometric traitment PostgreSql is open source and provide some good solution, and moreover you can adapt the thing to fit your needs.

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.