Improve ratio calculation
Merge pull request #1024 from geoadmin/fix_1022

Improve ratio calculation