Dear Collect Team

I have a kml file with an area of interest. While I am aware that Collect provides option for plot layout, I would like to generate a sampling design for the kml file. It would be great if you could help me guide on the steps to generate the sampling (I am looking for a systematic sampling, with plots at regular intervals) which also allows me to change the sampling density.

Thanks much!

asked 01 Nov '16, 13:43

kanchana's gravatar image

accept rate: 0%

edited 01 Nov '16, 13:45


You could use Quantum GIS (QGIS) to generate systematic sampling grids at regular intervals. Use Vector > Research Tools > Regular Points tool to create regular grids within the KML area of interest. You can either create grids at regular geographic units (deg/min/sec) or Cartesian distance in meters. For changing the sampling density, use the grid spacing option. Once you create the systematic grids, you could export this data as KML and then import using Collect or Collect Earth.

Hope this helps


permanent link

answered 01 Nov '16, 14:45

anish's gravatar image

accept rate: 0%

Hello Kanchana,

Another option, if you prefer to use Google Earth Engine is to use one of the scripts that we have been using to generate grids. This script has the advantage of being quite fast and easy to adapt to other areas.

The first thing you need to do is to upload the KML file with your boundaries to a Fusion Table. You can follow these instructions to upload the KML. You then need to copy the ID of the table so that you can use it in your script!

The selected part of the URL is the ID of the table. alt text

For instance, I have upload the KML file with boundaries for Spain (obtained from the Global Administrative Areas project ) and this is the result : LINK TO FUSION TABLE PROVINCES OF SPAIN. Make sure that the column types are set to "Text", as Fusion Tables sometimes understands column with names of cities, provinces or areas as Location columns and then you are not able to filter using those columns.

Now, you need to click on this link GEE SCRIPT and adapt it to your needs. Mainly you will need to change:

  • Line 5 : set the fusion table ID using the one that you just uploaded!
  • Line 8 : Filter the fusion table using the column and value that is relevant to your table
  • Line 29 : Set the distance in meters between plots! By default is set to 1000 meters
  • Line 34 : Set the EPSG code for the projection of the area that you will be working on

Once this is fixed you can click on the Run button and a link will appear on the right frame. If you click on that link (starts like ) then a CSV file will be downloaded to your computer.

This will contain data like this:


You can open this in Excel or Libre Office and adpat the columns. By default, the Collect Earth template contains the elevation, slope and aspect attributes. CLimate, Soil and Global Ecologic Zone are attributes ("From CSV") that are used in other surveys such as the Global Pilot Assessment survey.

Let me know if this clarifies your question or just made it sound more complex!

permanent link

answered 02 Nov '16, 13:21

collectearth's gravatar image

collectearth ♦
accept rate: 16%

Here is an updated version of the grid generation script from Google Earth Engine

permanent link

answered 30 Mar '19, 22:57

collectearth's gravatar image

collectearth ♦
accept rate: 16%

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]( "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: 01 Nov '16, 13:43

question was seen: 3,306 times

last updated: 30 Mar '19, 22:57