0

i have a lines layer that represents the bikeways of my city, and also have another overlapping layer that represents the bikeways that need repairs.

How can i get an analysis of the percentage or distance that needs reparing compared to the total length or 100% of the bikeways of the city?

1

1 Answer 1

2

Calculate the total length of each line layer. Divide the length of the bikeways that need repairs by the length of the bikeways, and multiply by 100. See detailed steps below:

  1. Make sure both layers are in an appropriate projected coordinate reference system (choose an equidistant or local state plane CRS), otherwise calculated lengths will be inaccurate.

  2. Open the Statistics panel, select the layer, and type in the expression $length.

    Note that length is measured in the units of the CRS, eg if your CRS is in feet then the length value will be in feet. If you need to convert to other length units, you can write that into the expression, eg to convert from feet to miles use instead the expression $length/5280

  3. Record the "Sum" value. Repeat for the second layer.

    enter image description here

  4. Calculate percentage of distance that needs repairing compared to the total length

    (total length of bikeways needing repairs) / (total length of all bikeways) * 100 = percentage of distance that needs repairing compared to the total length
    

Your Answer

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

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