---
title: "Problems generating the  kml file:"
url: "https://openforis.support/questions/2432/problems-generating-the-kml-file"
tags: ["collectearth"]
status: "answered"
score: 0
answer_count: 1
asked: "2019-07-29T08:51:00"
last_activity: "2019-07-30T12:42:03"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Problems generating the  kml file:

Asked by BrightEdem on 2019-07-29

I am having problem uploading the CSV grid I have generated in Google Earth. 

My attempt to load it shows the following error
Problems generating the  kml file:
freemarker.core.invalidReferenceException:The following has evaluated to null or missing
==>placemark.extrainfo[0][in template "kml_template.fmt"]


## Answer (score 0, by Open Foris on 2019-07-30)

Link: https://openforis.support/questions/2432/problems-generating-the-kml-file/2436

This error is possibly related to the structure of the CSV file not being exactly as expected by Collect Earth.

If you are designing the survey yourself, then you will have the option in Collect Survey Designer to produce a CSV template file for the survey. This template will show you the EXACT FORMAT that the survey expects for the CSV file with the plot locations (sadly the output from the [Google Earth Engine script to produce grids][1] doesn't comply with the expected format as it adds extra columns and possibly data that is not necessary, also, you will need to add a id column manually though Excel).
![alt text][2]

So that you need to make the output of the GEE script with the grid look exactly like the template (in the case of the example in the animation the columns are :

    id	YCoordinate	XCoordinate	elevation	slope	aspect	district	province	country




You will need to open the output from the GEE script,and make sure that the column headers and their order match completely the one in the template that was produced in Collect. Remember that in Excel you can move columns by selecting them and then drag-and-dropping them with the *Shift* button held


  [1]: https://collectearth.users.earthengine.app/view/collect-earth-grid-generator
  [2]: http://www.openforis.org/support/upfiles/2019-07-30_11-02-46.gif
