% title "Statistika" %> <% subtitle "a historie oprav značených cest".html_safe %>
V OSM je <%= ot = stat(@osm_trails.count, :osm_trails) %> značených tras, z toho <%= stat_with_history_link(tmp = @osm_trails.where('kctref IS NOT NULL').count, :osm_trails_with_kctref) %> (<%= proc(tmp,ot) %>) má nějaký kctref a a <%= stat_with_history_link(tmp = @osm_trails.where("kctref IS NOT NULL AND kctref REGEXP '^\\\\d\\\\d\\\\d\\\\d$' ").count, :osm_trails_with_new_kctref) %> (<%= proc(tmp,ot) %>) má nový kctref. Celkem <%= stat_with_history_link(tmp = @osm_trails.joins(:trail).where('trails.id IS NOT NULL').count, :osm_trails_with_associated_kct_trail) %> (<%= proc(tmp, ot) %>) tras je ověřeně přiřazeno k trase KČT. Jako nekompletní je označeno <%= otnc = stat(@osm_trails_incomplete_count, :osm_trails_incomplete) %> tras.
V KČT je <%= kt = stat(KctTrail.count, :kct_trails) %> tras. <%= @osm_trails_with_at_least_2_segments_count %> cest tj. <%= proc(@osm_trails_with_at_least_2_segments_count,ot) %> má více než jeden komponent, podrobněji je to vidět v tabulce
Komponent | celkem cest | procent | example trails |
---|---|---|---|
<%= seg_count %> | <%= stat_with_history_link(@osm_trails_segments_count[seg_count], :osm_trails_segments_count, seg_count).html_safe %> | <%= proc(@osm_trails_segments_count[seg_count],ot) %> | <% @osm_trails_segments_example_trails[seg_count].each do |tr| %><%= link_to tr, tr %>, <% end %> |
více | <%= pom = @osm_trails_with_at_least_12_segments_count %> | <%= proc(pom,ot) %> | <%= (@osm_trails_segments_example_trails[12..-1] || []).compact.collect{ |tr| link_if_not_nil(tr)}.join(', ').html_safe %> |
Celkem | <%= stat_with_history_link(@osm_trails.count, :osm_trails) %> | 100% |
KČT trasy pokrývají celkem <%= KctTrail.all.collect{ |kt| kt.delka }.sum %> kilometrů, OSM trasy pokrývají celkem <%= otkm = stat(@osm_trails.collect{ |ot| ot.delka || 0 }.sum / 1000, :length_of_osm_trails) %> kilometrů, z toho <%= stat_with_history_link((tmp = @osm_trails.where('kctref IS NOT NULL').collect{ |ot| ot.delka || 0}.sum / 1000).round, :length_of_osm_trails_with_kctref) %> (<%= proc(tmp,otkm) %>) km má kctref a <%= stat_with_history_link( (tmp = @osm_trails.where("kctref IS NOT NULL AND kctref REGEXP '^\\\\d\\\\d\\\\d\\\\d$' ").collect{ |ot| ot.delka || 0 }.sum / 1000).round, :length_of_osm_trails_with_new_kctref) %> (<%= proc(tmp,otkm) %>) km má nový kctref. Celkem <%= stat_with_history_link((tmp = @osm_trails.joins(:trail).where('trails.id IS NOT NULL').collect{ |ot| ot.delka || 0}.sum / 1000).round, :length_of_with_associated_kct_trail) %> (<%= proc(tmp,otkm) %>) km je ověřeně přiřazeno k trase KČT. Souhrnná délka mezer v trasách je <%= stat_with_history_link((@osm_trails.collect{ |ot| ot.length_with_gaps - (ot.delka || 0) }.sum / 1000).round, :length_of_osm_trails_gaps ) %> km.
V OSM je <%= og = stat(@osm_guideposts.size, :osm_guideposts) %> rozcestníků, z toho <%= oga = stat(@osm_guideposts.joins(:guidepost).where('guideposts.id IS NOT NULL').count, :osm_guideposts_with_associated_kct_guidepost) %> (<%= proc(oga,og) %>) je ověřeně přiřazeno k rozcestníku KČT, <%= ogrg = OsmGuidepost.where('(osm_guideposts.kctref is NOT NULL)').select{|og| og.kctref.match(/[A-ZŠšua-z][A-ZŚšuŘa-z]\s?\d\d\d.?/) }.count %> (<%= proc(ogrg,og) %>) má rozpoznatelný nový kctref a <%= ogr = stat(@osm_guideposts.where('kctref IS NOT NULL').count, :osm_guideposts_with_kctref) %> (<%= proc(ogr,og) %>) má nějaký ref. V KČT je <%= kg = stat(KctGuidepost.count, :kct_guideposts) %>) rozcestníků. Počty tras na kterých rozcestíky leží jsou v následující tabulce:
Počet cest | v OSM celkem | v OSM procent | OSM examples | v KČT celkem | v KČT procent | KČT example |
---|---|---|---|---|---|---|
<%= trails_count %> | <%= stat_with_history_link(@osm_guideposts_trails_count[trails_count], :osm_guideposts_trails_count, trails_count) %> | <%= proc(@osm_guideposts_trails_count[trails_count],og) %> | <% @osm_guideposts_trails_count_example_guideposts[trails_count].each do |og| %><%= cell(:osm_guidepost, og).(:kctref_link) %>, <% end %> | <%= stat_with_history_link(@kct_guideposts_trails_count[trails_count], :kct_guideposts_trails_count, trails_count) %> | <%= proc(@kct_guideposts_trails_count[trails_count],kg) %> | <% @kct_guideposts_trails_count_example_guideposts[trails_count].each do |kg| %><%= link_to kg.kctref, kg %>, <% end %> |
více | <%= pom = (14..@osm_guideposts_trails_count.size+1).collect{|i| @osm_guideposts_trails_count[i]}.compact.sum %> | <%= proc(pom,og) %> | <%= pom = (14..@kct_guideposts_trails_count.size+1).collect{|i| @kct_guideposts_trails_count[i]}.compact.sum %> | <%= proc(pom,kg) %> | ||
Celkem | <%= stat_with_history_link(@osm_guideposts.size, :osm_guideposts) %> | 100% | <%= stat_with_history_link(KctGuidepost.count, :kct_guideposts) %> | 100% |