I require nighttime satellite imagery over a particular geometry, clipped by Census Tract.
I have uploaded shapefiles into EE. I am going to loop through particular shapes and dates to export images and so far what I have is below in python. The big issue I'm having is that when I export, the image borders are black. I can accept any color other than grayscale as I will be using the images to train a neural network.
Here's my code:
# Google Earth Engine import ee # Initialize ee.Initialize() fc = ee.FeatureCollection('users/USERNAME/TN_CensusTractBoundaries') dataset = ee.ImageCollection('NOAA/VIIRS/DNB/MONTHLY_V1/VCMSLCFG').filter(ee.Filter.date('2017-05-01', '2017-05-31')).select('avg_rad') image = ee.Image(dataset.first()).reduce(ee.Reducer.max()).resample('bilinear') image = image.clip(fc.filterMetadata("Name","equals","kml_61146")) task = ee.batch.Export.image.toDrive( image = image.visualize(min = 1, max = 61), description="kml_61146", folder="GeoImages", scale=30, region=fc.filterMetadata("Name","equals","kml_61146").geometry().bounds().getInfo()['coordinates'], fileFormat='GeoTIFF' ) task.start()