5

I have a polyline layer which has a road network digitized, up the center, in both directions however the polyline are sat "one on top of the other".

I can display the lines separately by "offsetting" through the symbology however what i need is to change the actual positions of the lines by an offset so that the lines are then separate ( not sitting on top of each other)for exporting as a KML.

underdark
  • 84,148
  • 21
  • 231
  • 413
Nultyg
  • 51
  • 2

1 Answers1

1

I just figured this out using postgis, if you have access to that. I'm pretty new to postgis so perhaps there's a better way than this but it worked for me. I loaded the original shapefile as a table, then i did the following query. You'll have to add any columns you want from the original table to the query, represented below as column1, column2.

CREATE TABLE schema_name.newtable_name AS SELECT original_table_name.column1, original_table_name.column2, st_offsetcurve(original_table_name.geom, 'offset number') AS offset_geom, FROM original_table_name;

You can connect to the postgres database directly from QGIS and from there you should be able to export as a kml. Here's more about st_offsetcurve http://postgis.net/docs/ST_OffsetCurve.html

good luck!