1

I found this issue after exporting a mean composite of a custom NDVI band in the Landsat 8 Surface Reflectance collection to Google Drive only to get a lot of black lines on one side of the image. This pointed me out that it could be a projection related problem although I am not sure if this is the real reason of the black lines

A point inside the ROI I am using is at (-13.38427568438877, -71.905517578125) which is clearly located in the southern hemisphere and therefore, using the UTM crs, is located in the UTM 18S zone. The problem arises when requesting the projection info by using the .projection() method over one of the images in the collection, the output in the console shows crs: EPSG:32618, which is the spatial reference for UTM 18N zone, when it should show EPSG:32718 which is the correct one.

The code I am using to get this output goes as follows:

var region = ee.FeatureCollection(
  'ft:1A9vRY9l-eBNBFBwAV_mLAEeCIPYS2T14vsKhiEQc');
var crop = region.geometry();

function mask_image(image){
  return image.updateMask(image.select('pixel_qa').bitwiseAnd(ee.Image.constant(2)).eq(2));
}

function ndvi(image){
  return image.addBands(image.normalizedDifference(['B5','B4']).rename('NDVI'));
}

var start = ee.Date('2013-01-01');
var end = ee.Date('2017-12-31');
var image = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
              .filterDate(start,end)
              .filterBounds(crop)
              .map(mask_image)
              .map(ndvi);
print(image);

// This is where I begin the debug by narrowing down dates and
// checking the images projections one by one.
var test = image.filterDate('2016-03-01','2016-03-31');
print(test);
print(ee.Image('LANDSAT/LC08/C01/T1_SR/LC08_004069_20160315').projection());

var test2 = test.mean()

// This is the export that gives me black lines in the image
Export.image.toDrive({
  image: test2.select(['NDVI']).clipToCollection(region),
  description: 'NDVI-test',
  folder:'Landsat8-NDVI',
  scale: 30,
  region: crop,
  maxPixels:1e10,
  crs: 'EPSG: 32718'
  })

Map.centerObject(image,8);
Map.addLayer(ee.Image('LANDSAT/LC08/C01/T1_SR/LC08_004069_20160315'));
  • Can you get the extent of the raster? It could be using 32618, just letting the Y values be negative in the southern hemisphere. – mkennedy Jan 23 '18 at 23:25
  • I'm sorry if can not answer that question correctly, I'm still figuring out most of the technical info stored in GEE. The geotrasform of the test image is [30,0,709485,0,-30,-1323585] and the footprint coordinates of it are all in lat/lon, I'm not sure if that helps at all. – DangoMelon Jan 24 '18 at 4:57
  • There are many observations in your post, but it is not clear what your question is... Is it about black lines in your export? Is it about the projection of the mean image? Or is it something else? – Tyler Erickson Jan 24 '18 at 6:16
  • My main problem is the black lines showing up in the export file. Also I forgot to add the crs parameter in the export options to actually replicate the black lines problem. Since my ROI comprehends the union of two UTM zones (18S and 19S), I tried to get the result in the 18S and that's where I get the black lines. When exporting it in the 19S everything is alright as well as when not specifying the crs parameter. I believe the possible issue might be related to the projection of the images since they aren't in the right UTM zone as can be seen when using the .projection() method. – DangoMelon Jan 24 '18 at 7:30
1

According to the USGS Landsat web page "Why do Southern Hemisphere scenes not display the correct UTM designation?" all Landsat scenes are distributed using UTM North projections in order to avoid potential discontinuities when switching projections between scenes at the equator.

Listed below are the definitions for the North and South versions of UTM Zone 18. They have identical parameters except for the false_northing parameter, for which the values differ by 10,000,000 (meters).

EPSG:32618 definition:

PROJCS["WGS 84 / UTM zone 18N",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-75],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    AUTHORITY["EPSG","32618"],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH]]

EPSG:32718 definition:

PROJCS["WGS 84 / UTM zone 18S",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-75],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    AUTHORITY["EPSG","32718"],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH]]
  • This explains the doubt I had about the projections of the Landsat Surface Reflectance Collection in GEE and therefore it means that the base projection is not the cause of the black lines I'm getting when exporting the images. Should I make another post about it? – DangoMelon Jan 29 '18 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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