---
title: "Creating custom project in Collect Earth"
url: "https://openforis.support/questions/1478/creating-custom-project-in-collect-earth"
tags: ["collect", "collectearth"]
status: "answered"
score: 0
answer_count: 11
asked: "2017-11-25T16:09:43"
last_activity: "2018-01-05T17:53:25"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Creating custom project in Collect Earth

Asked by ashley4314 on 2017-11-25

So I am trying to create a custom project to survey tree cover in Myanmar. The version of Collect Earth that I downloaded is the "drylands demo" and appears to only include the US, Canada and Mexico. 

I need to overlay a grid for my study area in Myanmar. I found this answered question from 2015, but I am wondering if there is a better/newer way to go about this?
http://www.openforis.org/support/questions/71/creating-a-custom-project

Any help is appreciated, I am totally new to this and not sure exactly what to do.
Thank you!


## Answer (score 0, by Open Foris on 2017-11-27)

Link: https://openforis.support/questions/1478/creating-custom-project-in-collect-earth/1488

Hi Ashley,

You could try [this answer][1]


Basically, use the simple IPCC survey proposed in that post and also the link from Google Earth Engine link to generate the grid over Myanmar. You load the survey on Collect Earth and then you go to Tools->Properties to load the CSV file with the plot locations generated in Google Earth Engine ([you need to register as beta tester in order to use GEE][2] ) 

/Support


  [1]: http://www.openforis.org/support/questions/1444/creating-sampling-grid-for-collect-earth/1445
  [2]: https://signup.earthengine.google.com/#!/

> Thank you for the suggestion! Is there some sort of tutorial for GEE? I'm not seeing the Run function or anything they mention in the answer you linked, except for the polygon drawing which I assume is what I use to create the grid? (ashley4314)

## Answer (score 0, by Open Foris on 2017-11-27)

Link: https://openforis.support/questions/1478/creating-custom-project-in-collect-earth/1491

Yo![alt text][1]u need to drag down the top bar in order to see the code and the run button:


  [1]: http://www.openforis.org/support/upfiles/firefox_2017-11-27_23-42-25.png


## Answer (score 0, by ashley4314 on 2017-12-03)

Link: https://openforis.support/questions/1478/creating-custom-project-in-collect-earth/1501

Okay this makes more sense now, thank you! How would i determine what to change the distance between plots to? My only country of interest is Myanmar.


## Answer (score 0, by Open Foris on 2017-12-05)

Link: https://openforis.support/questions/1478/creating-custom-project-in-collect-earth/1508

So sample size calculation is a bit more tricky.

There are two things you need to consider:

 1. **Technical** : What is the level of
            accuracy you want to achieve.
            Specifically for what variable you
            are collecting. Different variables
            will have different uncertainties in
            the data collected as the
            uncertainty is measured through the
            number of times the value appears in
            the study. Normally you will achieve
            higher accuracy in the "main"
            classes like the IPCC Land Use
            Category (Forest, Settlement,
            Cropland...) than in the sudvisions
            (type of forest, type of cropland,
            type of grasslands...). So if you need a high accuracy on data
    of
        Land Use Change, you will need to
        collect a lot more plots that if you
        just want to have a high level of
        accuracy on the IPCC classes for the
        current Land Use.
 2. **Practical** : how
        much time you have for the data
        collection activity. Depending on
        the level of complexity of the
        survey, the internet speed and the
        knowledge of the area you should be
        able to collect between 100 (slow
        internet, difficult survey) to 300
        (fast internet, simplified survey)
        plots per day. How many days and how
        many people will be collecting data? Also, are there a lot of Google Earth very high resolution images in the AOI or will you need to use Landsat or Sentinel for assessing the plots (this takes longer)
        This will make the decision easier.
        Obviously, at the end you will get a
        certain amount of plots and from
        that you will be able to calculate
        the uncertainties.

So there are two approaches to try to accomodate these aspects : 

 1. Building a multiple grid so that the
    data collection can start from plots
    at say 10x10 km and then if the
    uncertainties is too large, refine
    it with a grid one level down, in
    this case 5x5 km. This grid has 4
    times as many plots than the initial
    one. Since you already collected the
    plots at 10x10km (say 100 plots)
    then it means that you will have to
    collect the remaining ones (in this
    example 300). If this data is still
    not accurate enough then you move to
    a 2.5x2.5 km grid and so on...
    
 2.   The previous approach can be a bit
    complex to set up. A very similar
    approach which is much easier to
    design and has identical results is
    to just use a random sampling
    design. In this case you will
    collect data in completely random
    plots. Once you have collected
    enough plots you may evaluate the
    uncertainties. If you are happy with
    that, you are done! If not, then you
    need to keep collecting data. To
    generate a random sampling design
    you can use this Google Earth Engine
    Script : [IMPROVED GRID GENERATOR][1]


  [1]: https://code.earthengine.google.com/c4a9f26e3b2242fca5571750531da1cc

> Thank you again for all the helpful information! So this time I was able to generate a random grid of 1000m x 100 as a test, however when I went to Run it to get a CSV table it failed. After 16 seconds the error message reads "Error: Error in map(ID=0_0001889cb5f78ad69ad2): Feature.select: Selected a different number of properties (11) than names (12)." I am unsure of what this means, am I doing something wrong? (ashley4314)

## Answer (score 0, by collectearth on 2017-12-11)

Link: https://openforis.support/questions/1478/creating-custom-project-in-collect-earth/1516

Hi Ashley,

The script seems to be running fine...can you try again?
This is the latest version [https://code.earthengine.google.com/c4a9f26e3b2242fca5571750531da1cc][1] 

/Regards

  [1]: https://code.earthengine.google.com/c4a9f26e3b2242fca5571750531da1cc

> I tried again, still an error, this time after 2 minutes. Maybe I am doing something wrong? I input the same values (1000m and 100 plots) and click Generate Grids, then there are two items under the Tasks tab in the top section, on the far right. I clicked Run next to "Myanmar random 100". I also tried to Run the "Myanmar syst 100" and that one failed almost immediately. (ashley4314)

## Answer (score 0, by collectearth on 2017-12-17)

Link: https://openforis.support/questions/1478/creating-custom-project-in-collect-earth/1540

Hi Ashley,

You are right, there is a problem with the script. If you choose a distance of 1000 meters the script fails due to an "out of memory" exception. For Myanmar (*676,578 km²*), a grid of 1000 meters means 676,578 plots... that is a bit too much for Google Earth Engine to handle (this grid generation script is not really what Google Earth Engine is made to do)

The random grid generation seems to be working well though, did you try that? I just generated a 10.000 plots grid using the script and it seems fine : [here the link][1] in case you want to download it.

Do you really need a 1.000 meters grid for all of Myanmar? Do you have a predefined study area? 
If you do I might be able to help you to generate the grid for just that area avoiding the "out-of-memory" issues.


  [1]: https://earthengine.googleapis.com/api/table?docid=cedff554eb085392822ea4ca49648433&token=39b9e0c13d144b59f9b0b2c2e3ed00c6


## Answer (score 0, by collectearth on 2017-12-18)

Link: https://openforis.support/questions/1478/creating-custom-project-in-collect-earth/1543

I have modified the script so that now you can choose a province or district within the country.
This should speed up the dense grid generation a lot! Check it:

[https://code.earthengine.google.com/c4a9f26e3b2242fca5571750531da1cc][1]


  [1]: https://code.earthengine.google.com/c4a9f26e3b2242fca5571750531da1cc

> Thank you so much! You are right, that was a very large number of plots for GEE to generate; my study area is Rakhine state so it is a lot better for me to focus on this one area. Unfortunately, the script is still failing even when I select Myanmar, then Rakhine state, and set the grid to 2000m x 50 plots. I really appreciate all of your help with this! (ashley4314)

## Answer (score 0, by Open Foris on 2017-12-20)

Link: https://openforis.support/questions/1478/creating-custom-project-in-collect-earth/1546

Hi again,
fixed the issues, please test again!

If you find another problem here is the output I generated :

[50 random][1] 

[2000 m systematic][2] 


  [1]: https://www.dropbox.com/s/8xturcgnpuliqjc/Myanmar%20Rakhine%20random%2050.csv?dl=0
  [2]: https://www.dropbox.com/s/aujr8ps9vhqx4c4/Myanmar%20Rakhine%20syst%202000m.csv?dl=0

> Thank you so much! Could you also do one for Taninthayi region, Myeik province? I just tried and this one failed, with the same distance and number of plots. (ashley4314)

## Answer (score 0, by Open Foris on 2017-12-21)

Link: https://openforis.support/questions/1478/creating-custom-project-in-collect-earth/1550

Hi Ashley,

Please check again that it is working. You need to click on the links in the console!

![alt text][1]


  [1]: http://www.openforis.org/support/upfiles/chrome_2017-12-21_11-53-03.png

> The file saves successfully when I use this link, but when I go to Downloads to open the file it just displays as "file" and cannot be opened in Excel. Previously, I have been able to open CSV files in Excel, and they display as CSV file on my computer, not just "File". Do I need to update my software or something? Sorry I am not very savvy (ashley4314)
> Hi there, just letting you know that I am still stuck with the previous issue from Dec 21 (saving the CSV files so they can be opened in Excel to "clean" the data for Collect Earth). Any assistance with this would be much appreciated! (ashley4314)

## Answer (score 0, by Open Foris on 2018-01-04)

Link: https://openforis.support/questions/1478/creating-custom-project-in-collect-earth/1558

Excel is not the best software when it comes to CSV as it is not "smart" enough.
In order to open a CSV file properly you have to define the character used as separator.
By default Excel tries to use the semicolon (;) character while the CSV files generated by GEE have a comma as column separator.

You can try to open the file this way instead: [LINK][1] (use commas!! )

Or even better you can install [LibreOffice][2] which has a much better CSV handling capacity.

Regards and happy new year!


  [1]: http://blogmines.com/blog/how-to-import-text-file-in-excel-2013/
  [2]: https://www.libreoffice.org/download/download/

> Thank you! So I am now finally able to clean the CSV file. I left only the first 3 columns (for my file it says earthID, latitude, longitude). When I try to load it into Collect Earth there is an error. Then I realized the "earthID" column is blank. I am sure something was wrong so I went back to this question since it had been awhile (http://www.openforis.org/support/questions/1444/creating-sampling-grid-for-collect-earth?page=1&focusedAnswerId=1445#1445). I see that their CSV file has just id for the first column, with 6-digit values. What do these ID numbers mean, and why are mine blank? (ashley4314)

## Answer (score 0, by collectearth on 2018-01-04)

Link: https://openforis.support/questions/1478/creating-custom-project-in-collect-earth/1561

The ID column should contain the unique ID of the plot. This is an alphanumeric value.

For your case you can just use Excel to fill the values sequentially (1,2,3...N)

The "uniqueness" is important as this ID will be used to identify the plot on the database, so **if you are going to work on different provinces make sure that the IDs are different** (you may use a prefix or suffix).

> Okay that makes sense. I may be uploading the file into Collect Earth incorrectly, but each time I try to add my CSV, even with each row numbered with a unique ID of my choice (I had tried using 1, 2, 3 etc yesterday), I get an error. In looking at the other question (link below) their CSV file has X and Y coordinates while the one I have, generated by GEE, has latitude and longitude. http://www.openforis.org/support/questions/1444/creating-sampling-grid-for-collect-earth?page=1&focusedAnswerId=1445#1445 (ashley4314)
