1

I am trying to clip a sea-surface temperature (SST) dataset to the coastal waters surrounding the Australian coastline. I have done this fairly successfully, but in a few small areas the SST pixel is not showing (despite being visible before a clip is applied).

I am guessing that there must be some sort of filter applied where if only a tiny bit of the 4km pixel is within the boundaries of the geometry clip then it is not visualized?

The clip works fine for the bathymetry layer included.

Is there anything that I can do to change this, so these small patches are included?

var vic_waters = ee.FeatureCollection('users/s3825806/Vic_Waters')
Map.setCenter(142.27321357334174,-38.37308591015567, 13); 
Map.addLayer(vic_waters, {color: 'orange'}, 'Vic_waters', false);
    
var GCOM = ee.ImageCollection('JAXA/GCOM-C/L3/OCEAN/SST/V3')
                    .filter(ee.Filter.date('2023-01-01', '2023-04-01'));
var seaSurfaceTemperature =GCOM.select('SST_AVE');
var SST = seaSurfaceTemperature.mean().multiply(0.0012).add(-10).clip(vic_waters);
Map.addLayer(SST, {min: 0.0,   max: 30.0, palette: ['000000', '005aff', '43c8c8', 'fff700', 'ff0000']}, 'SST');

var Bathy = ee.Image('users/s3825806/Victorian-coast_Bathy_10m')
var Bathymetry = Bathy.select('b1').clip(vic_waters);
Map.addLayer (Bathymetry, {min:-118,    max: 730.255126953125}, 'Bathymetry')

Code link:

https://code.earthengine.google.com/ee7b4295877c5df4921722f00af79f04

Screenshot, Green is SST, orange shows the shapefile where the SST is missing

8
  • In the raster model, there is no such thing as a "small part of a pixel" -- pixels are atomic. Either it's within or it's not. And the usual factor is whether the center is within. Assuming the pixels are square, a buffer of sqrt(pixel_size) will handle most boundary conditions.
    – Vince
    Apr 8, 2023 at 20:48
  • Thanks @Vince for your advice. The pixels are 4km and the coastal waters shapefile buffer covers the 1km from the coastline, so it could definitely be that the pixel centre is outside the coastal waters. The pixels are square. I would appreciate it if you would further explain your solution as I am a beginner to gee and have not had boundary issues before, and am not sure how to apply a buffer of sqrt(pixel_size)? Thanks Vince.
    – Jcd
    Apr 9, 2023 at 7:52
  • Your collections, users/s3825806/Vic_Waters and users/s3825806/Victorian-coast_Bathy_10m, are not shared. Apr 10, 2023 at 9:54
  • Thanks @DanielWiell i have just changed access to anyone can read, i hope that is what is required?
    – Jcd
    Apr 10, 2023 at 9:58
  • That part is missing from the original, unclipped dataset, as far as I can tell. You have to go back to around 2022-07-01 to find something in that area. Apr 10, 2023 at 10:06

0

Your Answer

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

Browse other questions tagged or ask your own question.