5

I am very new to Google Earth Engine and I want to be able to perform a feature overlay analysis like shown in this ArcGIS document: http://resources.esri.com/help/9.3/arcgisdesktop/com/gp_toolref/geoprocessing/overlay_analysis.htm

I can't seem to find a method to help me do this in GEE. I have two FeatureCollections. Both are collections of around 50 polygons, one of study sites and one of regions and I want to find out where the sites overlap the regions and if they overlap, what proportion of the site is in each region it overlaps. I have tried to use "intersection" but this only shows me the area of the intersection between sites and regions. There is a "clip" method that would be useful to clip the sites to the regions they are in but this appears to only be available to images not feature collections. Do you have any suggestions of how I might do this?

Thanks

ah9
  • 51
  • 1
  • 2
  • Are you trying to make a feature overlay or a raster overlay? For what you explained it seems to be a feature overlay – Rodrigo E. Principe Jun 01 '17 at 10:35
  • Yes a feature overlay, but I cannot see how to do this in Earth Engine, any suggestions? – ah9 Jun 01 '17 at 15:24
  • Earth Engine is not a vector processing tool, it is a raster processing tool, so I don't recommend using it for what you want, use QGIS instead – Rodrigo E. Principe Jun 01 '17 at 15:27
  • Thanks that's useful to hear, I know how to do it in Q but I am assessing how useful Google Earth Engine is for vector processing at this time and this is an example to test. – ah9 Jun 02 '17 at 09:01

1 Answers1

2

Although QGIS does the job rather easily, as already stated by Rodrigo E. Principe in the comments, it is possible to do this in GEE as well.

As I understand from your question, you did not get a feature returned from calling intersect(). There are actually mutliple ways to call intersect, depending on the type of data you try to apply it to. For every way, the output might be slightly different as well (just check the docs tab in the code editor).

Now I will assume that both you study sites and regions are in a featureCollection. The study sites will be called studySites and the regions will be called regions. The code you are looking for looks something like this:

// Extract geometries from you regions 
// If you have one region (type: feature), do:
var regionGeom = region.geometry();
// for more than one region (type: featureCollection), do something like:
var regionGeom = region.map(function(f) {
  return f.geometry();
});

// Now map over your study sites and use intersect to clip them on the region(s)
var stuySitesClip = studySites.map(function(f) {
  return f.intersection(regionGeom, 1); //1 refers to the maxError argument
});

Another option might be to use the GEE plugin in QGIS and combine the powers from both worlds (although I do not have any experience in that yet, but it might be worth the effort to try).

Tristian
  • 61
  • 1
  • 9