-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathjavascriptforGEE.R
More file actions
33 lines (25 loc) · 885 Bytes
/
javascriptforGEE.R
File metadata and controls
33 lines (25 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Javascript code
// Load the desired dataset
var dataset = ee.ImageCollection('BNU/FGS/CCNL/v1');
// Set the region to focus on (Korea)
var korea = ee.Geometry.Rectangle([124.5, 33.0, 131.5, 38.5]); // Adjust based on Korea's coordinates
// Define a visualization parameter
var visParams = {
min: 0,
max: 100,
palette: ['blue', 'green', 'yellow', 'red']
};
// Get an image from the dataset
var image = dataset.mean().clip(korea); // You can specify a date if needed
// Add the image to the map
Map.centerObject(korea, 6); // Center the map on Korea
Map.addLayer(image, visParams, 'BNU/FGS/CCNL/v1');
// Export the image as a GeoTIFF
Export.image.toDrive({
image: image,
description: 'BNU_FGS_CCNL_Export',
scale: 1000, // Define the scale in meters
region: korea,
fileFormat: 'GeoTIFF',
maxPixels: 1e13 // Adjust if needed depending on the size of data
});