3

I have a Network GIS which I have made in QGIS and has direction arrow, QGIS with Arrow (Direction of Travel / Start and End points)

but as soon as I export it to KML file I can just see the polylines without the direction.

KML without Arrow in Google Earth

Is there a way to get the direction / Start and End points of travel in KML to open in Google Earth ?

1 Answer 1

1

The arrows you see in QGIS are a layer styling option in QGIS. As far as I can tell (not being an expert with Google Earth), Google Earth doesn't have a way to style a line as an arrow. Instead, you can export the start and end points as separate layers, then add them to Google Earth and display them with square and triangle icons.

Step 1: Add start and end point coordinates to line layer attributes

Add 4 new fields using the

Field Calculator > Create a new field > type: Decimal Number

  • field name: start_point_x , formula: x( start_point( $geometry))
  • field name: start_point_y , formula: y( start_point( $geometry))
  • field name: end_point_x , formula: x( end_point( $geometry))
  • field name: end_point_y , formula: y( end_point( $geometry))

enter image description here

Step 2: Export point coordinates as csv files

Right click on line layer in Layer panel > Save vector layer as... > CSV

  • Name the file Start_point.csv.
  • Select the fields start_point_x and start_point_y, and any additional fields that you want associated with your start points.
  • Under geometry, select No geometry.

Repeat for end points

  • file name: End_points.csv
  • fields: end_point_x and end_point_y, and any additional fields
  • geometry: No geometry

    Step 3: Convert CSV files to KML files

Import each csv file created in step 2, using ..._point_x as the X field and ..._point_y as the Y field.

enter image description here

Right click on point layer in Layer panel > Save vector layer as... > KML

Step 4: Import KML files into Google Earth and select appropriate icon

enter image description here

2
  • Hi CSK, Thanks for the reply. I am stuck in Step 2, when I right click in Layer Panel, I can't locate the " Save vector layer as" can you please attach the screenshot for the same. Thanks
    – Duffer
    Feb 12, 2018 at 0:34
  • Right click on the name of the vector layer in the layer panel.
    – csk
    Feb 12, 2018 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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