diff --git a/Gemfile b/Gemfile index 14e91378f..f11e80be7 100644 --- a/Gemfile +++ b/Gemfile @@ -36,9 +36,7 @@ gem 'sprockets-vue', '~> 0.1.0' gem 'rails-controller-testing' -# gem 'gdal', '~> 2.0' -# TODO Stanley - Need to remove the below -gem 'gdal', '~> 3.0' +gem 'gdal', '>= 2.0' # group :production, :staging do # gem 'unicorn' diff --git a/lib/modules/stats/global.rb b/lib/modules/stats/global.rb index aab9a267a..2b60a8275 100644 --- a/lib/modules/stats/global.rb +++ b/lib/modules/stats/global.rb @@ -1,6 +1,10 @@ class Stats::Global IUCN_CATEGORIES = "'Ia', 'Ib', 'II', 'II', 'IV', 'V', 'VI'" + def self.pa_count + ProtectedArea.count + end + def self.percentage_pa_cover RegionalStatistic.joins(:region) .where('regions.iso' => 'GLOBAL')