---
title: "How to add information obtained from external source to Collect Earth plots?"
url: "https://openforis.support/questions/339/how-to-add-information-obtained-from-external-source-to-collect-earth-plots"
tags: ["collectearth"]
status: "answered"
score: 0
answer_count: 1
asked: "2015-09-22T11:09:59"
last_activity: "2015-09-22T16:36:07"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# How to add information obtained from external source to Collect Earth plots?

Asked by abejin on 2015-09-22

I want to add some information obtained from external source to assessed Collect Earth plots to make those information available for analysis using SAIKU.  Is it possible?  If so, how can I do that?


## Answer (score 0, by collectearth on 2015-09-22)

Link: https://openforis.support/questions/339/how-to-add-information-obtained-from-external-source-to-collect-earth-plots/344

This is a process that involves **four steps**.

 1. **Add the extra attributes** to the survey in Collect Survey Designer
 2. **Refresh the database** structure with the new attributes by exporting the survey to CEP and double click on it
 3. **Generate a CSV** file with the values of those attributes per plot
 4. **Import the CSV** file into your survey do that the current database is imported

ATTENTION: For this you will need to have imported the survey (you can use the placemark.idm.xml file inside the CEP) into you [Open Foris Collect][1] and should have it installed somewhere (possibly your computer)

Adding a new attribute
----------------------

So, step 1 is quite straight forward. Lets say that you have your survey already loaded in the survey designer. You need to access the survey, go to the scheme tab and there add a new attribute, use text, number or code depending on the attribute type you will be using. 

It is important, as this data is added after you have already have collected the data, that you mark the field as Never being relevant using the *false()* expression. This means that **the attribute will not show up in the form and it will not be required** if new data is collected. 

![alt text][2]

So, say that now you have added a new code attribute called **soilcode**. It is linked to a code-list called "soiltypes" where you have imported the codes for the possible types of codes in your region. Obviously the codes must coincide with the data you will import. If this was a text attribute then it wouldn't matter.

Exporting the Survey and updating the database
----------------------------------------
This one is quite easy. You just need to export the Collect survey though Collect Designer and double click on the resulting CEP file!

![alt text][3]

Generate the CSV with the data to load/update
----------------

So after you modified the survey and imported it the structure of the Collect database used by Collect Earth has changed and now there is a new "column" soilcode on the plot table.

The data for this soilcode is empty and you need to update the data on the plots ALREADY ON THE DATABASE (if you have not yet collected data for a plot you cannot update it) .

To do this you need to generate a CSV file that links the plots (using the ID) to the value of the *soilcode*. If you are extracting data from a soil map shapefile you can easily process the data using QGis or similar.
 Please see this other answer on the forum on how to do this: [LINK][4]. 

So you will end up with a CSV file **updatePlots.csv** like this (say that 5888,5889,5890.... are the IDs of the plots for which you have collected information and that SOL and NET are codes contained in the codelist *soiltypes* that the *soilcode* attribute makes reference to
 )

    plot_id,soilcode
    5888,SOL
    5889,NET
    5890,SOL

Import the CSV data
-------------------

So now this is the final step and quite straight forward.
Use the menu **Tools->Data Import/Export->Update current records using CSV** and select the file that you have generated  **updatePlots.csv** .
You get a dialog that shows the process running. 

Once that is done you can run Saiku again (choosing to update the database when you are prompted) and the new attribute should be shown on the left panel!!

Easy peasy!

 



  [1]: http://www.openforis.org/tools/collect.html
  [2]: http://www.openforis.org/support/upfiles/2015-09-22_15-33-17.png
  [3]: http://www.openforis.org/support/upfiles/2015-09-22_15-42-01.png
  [4]: http://www.openforis.org/support/questions/80/changing-plot-attributes-in-the-collect-earth-database
