I have a map with many counties, and I estimated the length of the common borders using one of the answers from this question posted a year ago.
The properties of my layer look like this:
I did the following:
Layer > Add Layer > Add/Edit Virtual Layer
And then entered this query:
select a.id as poly1_id, b.id as poly2_id, st_intersection(a.geometry, b.geometry) as geometry, st_length(st_intersection(a.geometry, b.geometry)) as border_length from units_1 a join units_1 b on st_intersects(a.geometry, b.geometry) and a.id < b.id
I got the following results, which don't seem right:
I believe I am getting the length in the map's units which are probably degrees but I am not sure. Does anyone know what is going on and how to get the results in kilometers?