Skip to content

Commit

Permalink
Export now excludes any observations that have 0% coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
dryror committed Jun 22, 2014
1 parent 5bf54d7 commit 1d624a2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/controllers/exportModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ function makeCSV() {

for (var observation in results[transect][plot]) {
if (typeof results[transect][plot][observation] === 'object' && results[transect][plot][observation] != null) {

// Skip the entry if the ground cover is 0
if (results[transect][plot][observation].ground_cover == 0) {
continue;
}

// Convert utc to date and time
var utc = parseInt(results[transect][plot].utc);
var d = new Date(utc);
Expand Down Expand Up @@ -257,6 +263,7 @@ function makeCSV() {
generalSurveyTxt += dq + comments + dq + c;

generalSurveyTxt += dq + results[transect][plot][observation].ground_cover + dq + c;

var observationPhoto = results[transect][plot][observation].observation_photo;
if (observationPhoto != null) {
generalSurveyTxt += dq + observationPhoto + dq + nl;
Expand Down

0 comments on commit 1d624a2

Please sign in to comment.