I have a KML file which contains a line feature representing the passage of an Optical Fiber connecting two cities. I can trace them nicely in QGIS and OpenStreetMap.
I would just like to know how I can determine its length.
Save AS ... the kml file as a shapefile into a CRS that uses meters as units, like your local UTM zone.
Then you can use the
$length variable to label the line with the length in the layers units.
My solution to the problem would be:
Another option is to do the measurement in Google Earth. Google Earth Pro now makes it easy to get the length of line segments in your KML files (or polygon area & perimeter length). You can find it by going into the edit dialog for the KML feature and selecting the "Measurements" tab. The edit dialog is available by right-clicking the KML feature in your Places list, and selecting "Properties" (Get Info on Mac).
That should work well if your line is one long line segment. If it's lots of small segments, then you'll want to do some GIS work to combine them... and then measure it in your GIS or export back to KML for measurement in Google Earth.
FYI that Google Earth Pro is now free for everyone (use GEPFREE as the license key).