TransWikia.com

Google earth engine: How to get yearly DN value by satellites from DMSP-OLS nighttime satellite data

Geographic Information Systems Asked by Takeshi on December 15, 2020

I would like to get the panel data of the nighttime light in Japan and check the correlation between other economic statistics. In order to do that, I have to get yearly digital number value from each satellite, F10, F12, F14, F15, F16, and F18, and intercalibrate it as Elvidge et al(2009) did.

Here is the code in which I could get the DN value in 1994, the year which F10 and F12 exist at the same time. but I can’t identify which satellite are the data from.

So, the question is below:

How can I check which satellite are the data from?

If it is impossible to make sure of it, How to get DN value from a certain satellite?

var dataset = ee.ImageCollection('NOAA/DMSP-OLS/NIGHTTIME_LIGHTS').select('stable_lights');
var v1994 = dataset.filter(ee.Filter.date('1994-01-01', '1994-12-31')).median();
var nighttimeLightsVis = {min: 0.0, max: 60.0};
Map.addLayer(v1994.clip(jpn), nighttimeLightsVis, "Nighttime_1994");
var reducer1 = ee.Reducer.mean();
var reducers = reducer1.combine({reducer2: ee.Reducer.median(), sharedInputs: true})
function ntl(image) {var pas = image.reduceRegions({  collection: jpn,  reducer: reducers,  scale: 500,});return pas}
function export_table (table, description) {var em = Export.table.toDrive({ collection: ee.FeatureCollection(table), description: description, folder:'GIS', selectors:(["CITY_ENG","JCODE","mean"]),});return em}
var nl_v1994 = export_table(ntl(v1994), 'NL_v1994Ejpn');

*I got the border data, "jpn" in this code, from this website

*I tried to use the GeoTIFF image which downloaded from this website, but I got an error: Image.reduceRegions: Unable to find a crs.

One Answer

The satellite is saved in the property system:index. You can acces it like this for a single image:

var dataset = ee.ImageCollection('NOAA/DMSP-OLS/NIGHTTIME_LIGHTS')
                .select('stable_lights');

print(dataset.first().get("system:index"))

If you only want Images from the satellite F14 you can use filterMetadata

print(dataset.filterMetadata("system:index", "contains", "F14"))

When using .mean() or .median() and not filter the satellites beforehand, it will always use all available data from the ImageCollection you give it.

See here for more general info on the dataset.

Correct answer by JonasV on December 15, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP