8

Is it possible to reproject an image in earth engine to non-EPSG defined coordinates? In particular either Goode Homosline (SR-ORG:7619) or Mollweide (ESRI:54009). Passing either to .reproject() returns an error stating that the CRS cannot be parsed.

1 Answer 1

10

Yes, Earth Engine can reproject images to non-EPSG coordinate reference systems.

Earth Engine uses the Java GeoTools library for coordinate system transformations which supports the Coordinate System Well-Known Text (WKT) format, and a set of base projections.

Mollweide

The ESRI:54009 World Mollweide coordinate reference system (CRS) has a WKT representation that includes a base projection entry PROJECTION["Mollweide"] that is supported by GeoTools. The following Earth Engine code shows how to reproject to World Mollweide:

// Get a sample image (Landsat 8) which uses a UTM projection.
var image = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_044034_20170614');

// Get the bounding coordinates of the Landsat image.
var bounds = image.geometry().bounds().getInfo()['coordinates'];

print('Original image (UTM) URL:',
  image.getThumbURL({
    bands: ['B4', 'B3', 'B2'],
    min: 0,
    max: 0.3,
    dimensions: '400'
  })
);

// Project the image to Mollweide.
var wkt = ' \
  PROJCS["World_Mollweide", \
    GEOGCS["GCS_WGS_1984", \
      DATUM["WGS_1984", \
        SPHEROID["WGS_1984",6378137,298.257223563]], \
      PRIMEM["Greenwich",0], \
      UNIT["Degree",0.017453292519943295]], \
    PROJECTION["Mollweide"], \
    PARAMETER["False_Easting",0], \
    PARAMETER["False_Northing",0], \
    PARAMETER["Central_Meridian",0], \
    UNIT["Meter",1], \
    AUTHORITY["EPSG","54009"]]';

var proj_mollweide = ee.Projection(wkt);
var image_mollweide = image.reproject({
  crs: proj_mollweide,
  scale: 300
});

print('Projected image (World Mollweide) URL:',
  image_mollweide.getThumbURL({
    bands: ['B4', 'B3', 'B2'],
    min: 0,
    max: 0.3,
    region: bounds,
    dimensions: '400'
  })
);

(Link to the code: https://code.earthengine.google.com/5b50ad250e83ec994335615c4db72a00)

The original image in a UTM projection looks like: enter image description here

While the World Mollweide projected images looks like: enter image description here

Goode Homosline

By contrast the SR-ORG:7619 (Interrupted Goode Homosline) has a CRS WKT that includes a base projection entry PROJECTION["Interrupted_Goode_Homolosine"] that is not supported by GeoTools, so it is not supported by Earth Engine.

4
  • Thank you for the excellent and very comprehensive answer Tyler! That's perfect. Legend!
    – scabecks
    Commented Mar 4, 2018 at 10:01
  • @tyler-erickson seems like this approach fails with Equal Earth projection, despite supprt in GeoTools
    – Basile
    Commented Nov 5, 2021 at 10:06
  • 1
    Is there any way to know whether a base projection is supported by GeoTools, besides trial-and-error in GEE? Thanks!
    – Matifou
    Commented Sep 15, 2022 at 11:48
  • You can copy WKT strings from projectionwizard.org
    – cengstro
    Commented Nov 30, 2022 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.