DOI: 10.7910/dvn/lbywuf
title: Visualizing inconsistencies among global agricultural land cover products using Google Earth Engine

description: &lt;b&gt;Visualizing inconsistencies among global agricultural land cover products using Google Earth Engine&lt;/b&gt;&lt;br&gt;&lt;br&gt;

This map product demonstrates challenges associated with mapping global agriculture, particularly smallholder agriculture in areas where land use is mixed at fine spatial resolutions (Peter et al. 2018). In the case of Malawi, smallholder agriculture fields may be mixed with tree cover, barren land, housing structures, shrubs, and other land-cover types within a 500-m MODIS land-cover pixel. When subtle thresholds determine land-cover classifications, smallholder agricultural lands in Malawi can become completely missed by global land-cover products. The purpose of visualizing these data is to show that more research is needed regarding agricultural land classifications and that global-scale data require substantial attention for addressing local-scale problems. 
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Categories&lt;/b&gt;&lt;br&gt;
0 - None &lt;br&gt;
1 - GlobCover &lt;br&gt;
2 - MCD12Q1_v051 &lt;br&gt;
3 - MCD12Q1_v006 &lt;br&gt;
4 - MCD12Q1_v051 & MCD12Q1_v006 &lt;br&gt;
5 - MCD12Q1_v051 & GlobCover &lt;br&gt;
6 - MCD12Q1_v006 & GlobCover &lt;br&gt;
7 - MCD12Q1_v051 & MCD12Q1_v006 & GlobCover
&lt;br&gt;&lt;br&gt;

&lt;i&gt;Interactive Google Earth Engine Application&lt;/i&gt;
&lt;br&gt;
&lt;a&gt;https://cartoscience.users.earthengine.app/view/where-is-agriculture&lt;/a&gt;
&lt;br&gt;&lt;br&gt;

&lt;i&gt;GlobCover Agricultural Land-Use Data&lt;/i&gt;
&lt;br&gt;
European Space Agency (ESA), 2016. GlobCover 2009. http://due.esrin.esa.int/page_globcover.php.
&lt;br&gt;&lt;br&gt;
&lt;i&gt;NASA MODIS MCD12Q1 (v051) Agricultural Land-Use Data&lt;/i&gt;
&lt;br&gt;
NASA LP DAAC, 2015. MODIS Land Cover Type (MCD12Q1) Version 051. NASA EOSDIS Land Processes DAAC, USGS Earth Resources Observation and Science (EROS) Center, Sioux Falls, South Dakota.
&lt;br&gt;&lt;br&gt;
&lt;i&gt;NASA MODIS MCD12Q1 (v006) Agricultural Land-Use Data&lt;/i&gt;
&lt;br&gt;
NASA LP DAAC, 2015. MODIS Land Cover Type (MCD12Q1) Version 006. NASA EOSDIS Land Processes DAAC, USGS Earth Resources Observation and Science (EROS) Center, Sioux Falls, South Dakota. https://lpdaac.usgs.gov/products/mcd12q1v006/.
&lt;br&gt;&lt;br&gt;
&lt;i&gt;Mapping Smallholder Agricultural Land&lt;/i&gt;
&lt;br&gt;
Peter, B.G., Messina, J.P. and Snapp, S.S., 2018. A Multiscalar Approach to Mapping Marginal Agricultural Land: Smallholder Agriculture in Malawi. &lt;i&gt;Annals of the American Association of Geographers&lt;/i&gt;, 108(4), pp.989-1005.
&lt;br&gt;&lt;br&gt;
&lt;i&gt;Google Earth Engine Platform&lt;/i&gt;
&lt;br&gt;
Gorelick, N., Hancher, M., Dixon, M., Ilyushchenko, S., Thau, D. and Moore, R., 2017. Google Earth Engine: Planetary-scale geospatial analysis for everyone. &lt;i&gt;Remote Sensing of Environment&lt;/i&gt;, 202, pp.18-27.
&lt;br&gt;&lt;br&gt;
&lt;i&gt;Google Earth Engine Code&lt;/i&gt;
&lt;code&gt;
&lt;pre&gt;
var mcd12q1_v051 = ee.ImageCollection("MODIS/051/MCD12Q1").mode().select('Land_Cover_Type_1');
var mcd12q1_v051_ag = mcd12q1_v051.eq(12).or(mcd12q1_v051.eq(14));
var mcd12q1_v006 = ee.ImageCollection("MODIS/006/MCD12Q1").mode().select('LC_Type1');
var mcd12q1_v006_ag = mcd12q1_v006.eq(12).or(mcd12q1_v006.eq(14));
var globcover = ee.Image("ESA/GLOBCOVER_L4_200901_200912_V2_3").select('landcover').lte(30);

var add = globcover.add(mcd12q1_v051_ag.remap([0,1],[0,3])).add(mcd12q1_v006_ag.remap([0,1],[0,5]));

var remap = add.remap([0,1,3,4,5,6,8,9],[0,1,2,5,3,6,4,7]);
 //0 - none
 //1 - globcover
 //2 - mcd12q1_v051
 //3 - mcd12q1_v006
 //4 - mcd12q1_v051 + mcd12q1_v006
 //5 - mcd12q1_v051 + globcover
 //6 - mcd12q1_v006 + globcover
 //7 - mcd12q1_v051 + mcd12q1_v006 + globcover
 
var cats = remap.updateMask(remap.neq(0));
var colors = ['01545A','017351','03C383','AAD962','A12A5E','710162','ED0345'];

Map.setOptions('HYBRID');
Map.setCenter(33.77,-13.96,8);
Map.addLayer(cats, {palette: colors, min: 1, max: 7}, 'agriculture');
&lt;/pre&gt;
&lt;/code&gt;
&lt;br&gt;
&lt;i&gt;This content is made possible by the support of the American People provided to the Feed the Future Innovation Lab for Sustainable Intensification through the United States Agency for International Development (USAID). The contents are the sole responsibility of the authors and do not necessarily reflect the views of USAID or the United States Government. Program activities are funded by USAID under Cooperative Agreement No. AID-OAA-L-14-00006.&lt;/i&gt;