Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
191 views
in Technique[技术] by (71.8m points)

Qgis: calculating distances for different types of lines for a report table

I have a Qgis project with lines classified in a field in 5 types. Composing a report, I need a table that shows the five types of line in the first column and in the second column the length for each type of line. No idea how to do this.

Any help, please?

question from:https://stackoverflow.com/questions/65945322/qgis-calculating-distances-for-different-types-of-lines-for-a-report-table

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Solved.

CASE 
    WHEN  "Infra_class" = 0 THEN round ( sum ( "length","Infra_class" is '0') )
    WHEN  "Infra_class" = 1 THEN round ( sum ( "length","Infra_class" is '1') )
    WHEN  "Infra_class" = 2 THEN round ( sum ( "length","Infra_class" is '2') )
    WHEN  "Infra_class" = 3 THEN round ( sum ( "length","Infra_class" is '3') )
    ELSE round ( sum ( "length","Infra_class" is '4') )
END

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...