I have this small code for getting nightlight image for a particular city using VIIRS Nighttime dataset.
var district = ee.FeatureCollection('ft:1PA2zwArj8EsplrX9eMxJ2H_TICyyx855KPnbJhC1','geometry')
.filter(ee.Filter.eq('name','Gurgaon'));
var nighttime = ee.Image(ee.ImageCollection('NOAA/VIIRS/DNB/MONTHLY_V1/VCMCFG')
.select('avg_rad')
.filterBounds(district)
.filterDate('2013-05-01', '2017-05-31')
.median())
var nighttimeVis = {min: 0.0, max: 60.0};
Map.addLayer(nighttime.clip(district), nighttimeVis, 'Nighttime');
Now I wish to export this image to my Google Drive. Usually I use the following script for exporting:
Export.image.toDrive({
image: nighttime.clip(district),
description: 'Nighttime_Image',
maxPixels: 499295920080,
scale: 30,
region: district
});
But for this particular image, I need to specify the min and max values like I have done while using Map.addlayer (for viewing the image) by using nighttimeVis vector. How can I specify the same max and min before or in my Export command for this image?