I have an output CSV from Collect Earth and their survey used to record historical data for the LULUCF. Currently, I need to review and update the records as necessary, but I don't have the respective XML file. So, I would like to know if is there a way to import these data to Collect Earth using CSV file?

asked 18 May '23, 14:41

Hercilo's gravatar image

accept rate: 0%

edited 22 May '23, 09:47

The Export/Import in Collect Earth is always easiest if you have the XML format. PLEASE ALWAYS KEEP A COPY OF THE DATA COLLECTED AS AN XML!!!

ATTENTION : if you just want to update data you already have in Collect Earth though a CSV follow these instructions

Importing CSVs to an empty database gets a bit complicated as it must be done through Collect https://openforis.org/tools/collect/ (not Collect Earth )

The steps to reproduce are as follow (see images at the bottom :

  • Import the Collect Earth survey in Collect
  • Publish the survey ( you can only import data into Surverys that are marked as published)
  • Go to the Data Management section then to "Import"->"From CSV/Excel"
  • Import the CSV ( see next section on caveats)

Caveats :

The CSV data import is done at entity level. Meaning that you have one CSV per entity in the CE survey.

Most surveys have a parent entity called plot which all the data in the db is descending from. You must import the data from that level first.

Then you need to import the sub-entities, which in most CE surveys refer to Land Cover.

If you want to know what is the structure that you should use in the CSVs that you use for importing you can check in the Survey editor section on the Collect tool. Go to your survey, then on the advanced features (bottom-right) click on "Export CSV data import/export template". This will generate a ZIP file with the structure of the CSV files for the root entity, plot and if there are, its subentities.


I have created a survey using the CE IPCC template to collect land use and land cover. I have published the survey.

This survey has three entities, the root one called plot and then its subentities "land_use" and "land_cover"

alt text

So, with my test CEP called import_test ( CEP file ) I have collected data for 2 plots ( this is the XML file with the plots ) . As I want to show how to import the data from a CSV instead of an XML (the easy way), I have exported the data to CSV generating this file with all the data for the 2 plots.

Then, following the template for the CSV data import/export that I generated as explained before (this is the info that I got ) I have split the original CSV into three files, the plot.csv file, the land_use.csv file and the land_cover.csv file .

Notice how for each plot in the plot_csv file I have six lines in the land_use and 9 lines in the land_cover file! This is because the database will generate one record per land use or land cover!

I have then gone to the Data Management section in Collect and selected the import_test survey to start operating with:

alt text

Then on the import CSV option we start by importing the CSV of plots ( the root entity). Choose the option to "Insert new records" and upload the plots.csv file:

alt text

After you import the plots, then you need to use the option to "Update existing records", then choose land_use and after land_cover.

alt text

link text

After you have done this (and hopefully it all worked) you will have all the data in you Collect database. You can then export the data to XML and import it back into Collect Earth!!


LESSON LEARNT : Always keep the data from you Collect Earth assessments on the XML (zipped) format! Data management will be so much easier!!!!


alt text alt text alt text alt text alt text

permanent link

answered 22 May '23, 12:56

Open%20Foris's gravatar image

Open Foris ♦♦
accept rate: 10%

edited 22 May '23, 12:57

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 18 May '23, 14:41

question was seen: 783 times

last updated: 09 Oct '23, 16:53