Just starting to learn Google Earth Engine. Sorry if this is covered elsewhere but I couldn't find a tutorial or post about it.

I'm doing a pretty simple image export, but when I load the TIFF into QGIS later (to add state boundaries, etc) it seems to have an incorrect coordinate system and doesn't match up with other shapefiles.

Here's the code:

var cdl = ee.Image('USDA/NASS/CDL/2017').select('cropland')

var crops = ee.List([1,4,5,7,9,10, 31, 33, 36, 45, 63, 64, 86, 241])

var mask = ee.Image(cdl)
var masked = ee.Image(cdl)

// Map.addLayer(filtered)
Map.addLayer(mask, {}, 'mask')
Map.addLayer(masked, {}, 'masked')

var remapped = cdl.remap({
  from: crops,
  to: ee.List.repeat(1, crops.size()),
  defaultValue: 0

Map.addLayer(remapped, {}, 'remapped')

// Export the image, specifying scale and region.
  image: masked,
  description: 'corn-test',
  scale: 1000,
  maxPixels: 99999999

It's worked with another dataset so not sure why this one is off.

Here's a screenshot of what the tif looks like in QGIS next to an actual shapefile from the Census:

layers don't match

CRS for the corn tif:

USER:100025 - * Generated CRS (+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs) - Projected

CRS for the census shapefile:

EPSG:4269 - NAD83 - Geographic

I've tried to re-project the tif and it always seems to disappear (nothing happens when I "zoom to layer")

  • Are you sure your census shapefile has been assigned the correct CRS? I.e. are you sure the GEE geotiff is improperly located, or could it be the census one? You can check the CRS by double-clicking the layer in QGIS and looking at the "Information" tab. Make sure the CRS matches what the data provider says it should. (And you should report that information in your question.) – Jon Dec 6 at 15:02
  • edited the original post above with CRS information – Mira Rojanasakul Dec 6 at 22:59
  • Using QGIS, you can add a base layer like OpenStreetMap from the QMS plugin to see which dataset is correct and which is misplaced. – AndreJ Dec 7 at 7:33

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.