I've been trying to use QGIS to calculate the length of polylines found in KML files, after having difficulty getting ArcGIS to work properly.
I used this process: https://www.qgistutorials.com/en/docs/3/calculating_line_lengths.html
Essentially doing:
- Starting default project in QGIS (using EPSG:4326)
- Using QuickMapServices to set a base map layer (say, google hybrid)
- Dragging and dropping the KML into QGIS. The placement of the KML aligns with the basemap, as well as the KML's placement in other programs like google earth.
- Either using the tutorial listed above (creating a geometry attributes layer via 'ellipsoidal' CRS) or using the field calculator to create a length attributes table.
Then using the lengths as I please.
However, there seems to be a difference in value between google earth pro and QGIS in some cases. In a test KML file I made in google earth pro, the length of a 15km line is almost exactly the same value (difference of about 10 metres) but with other files, the difference is almost double, despite the fact that they look exactly the same in KML
What could be causing this difference? Is it something to do with the KML files themselves (could the imported files be interpreting the lines as rectangles)? The process of importing and/or calculating? Something else?
EDIT: Ok, something is up - it seems that only ONE of the kml files i have been using previously are acting strangely. Not sure what's causing this specific one to have massive differences in distance, but the others I have used before all seem to mostly match the distances that QGIS report.