EarthEngine: average/reduce a raster at resolution of coarser raster? Planned maintenance...
Illegal generic type for instanceof when using local classes
At the end of Thor: Ragnarok why don't the Asgardians turn and head for the Bifrost as per their original plan?
Why did the IBM 650 use bi-quinary?
2001: A Space Odyssey's use of the song "Daisy Bell" (Bicycle Built for Two); life imitates art or vice-versa?
Why am I getting the error "non-boolean type specified in a context where a condition is expected" for this request?
What LEGO pieces have "real-world" functionality?
Overriding an object in memory with placement new
Why are Kinder Surprise Eggs illegal in the USA?
How to bypass password on Windows XP account?
Should I use a zero-interest credit card for a large one-time purchase?
Selecting the same column from Different rows Based on Different Criteria
How to run gsettings for another user Ubuntu 18.04.2 LTS
Is it true that "carbohydrates are of no use for the basal metabolic need"?
How come Sam didn't become Lord of Horn Hill?
Extract all GPU name, model and GPU ram
What does an IRS interview request entail when called in to verify expenses for a sole proprietor small business?
English words in a non-english sci-fi novel
Why do we bend a book to keep it straight?
How to find all the available tools in macOS terminal?
porting install scripts : can rpm replace apt?
Output the ŋarâþ crîþ alphabet song without using (m)any letters
How to deal with a team lead who never gives me credit?
Book where humans were engineered with genes from animal species to survive hostile planets
Can an alien society believe that their star system is the universe?
EarthEngine: average/reduce a raster at resolution of coarser raster?
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Convert Raster Resolution in arcGISHow I can resample raster data infrom 10 meters to 20 meters resolution in ArcMap?Resample fine raster before extracting values to coarser grid?Changing Raster Resolution to match other Raster in QGISreduce image collection to get annual monthly sum precipitationUp-sampling (increasing resolution) raster image using GDAL?Applying a reducer over a very large featureResampling multiple coarser raster images based on another finer resolution raster using R?Changing the spatial resolution - stacked raster in RReduce GEE memory usage?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I want to average a 30m raster at the resolution of a 1000m one. Specifically, I want to computer, for each Daymet raster cell, the percentage of cultivated land from the 30m CDL.
How can I do that in EarthEngine? My question very similar to one asked on the EE list. The author was exploring 3 solutions:
- A bilinear resample
- Reproject
- ReduceRegions, using a coarser raster that has been converted to features.
Someone gave an answer using reduceNeighborhood() to use a mean reducer, then reproject(), but it does not give quite the right result (see below, not right scale). How can I adjust that solution (I'm giving wrong scale parameters presumably?), or is there another solution that would be better?
Code
// DATA Import
var CDL = ee.ImageCollection("USDA/NASS/CDL")
var daymet = ee.ImageCollection("NASA/ORNL/DAYMET_V3").
filter(ee.Filter.calendarRange(2015, 2015, "year"))
var aoi = ee.Geometry.Polygon([[[-100.501, 42.9819],[-100.501, 42.4045], [-98.39, 42.40457], [-98.39, 42.98192]]])
var CDL_2015 = ee.Image("USDA/NASS/CDL/2015").select("cultivated").clip(aoi)
var DYM_2015 = ee.Image(daymet.first()).select("tmin").clip(aoi)
// Operation
var image_frac=CDL_2015.eq(2).reduceNeighborhood({
reducer: ee.Reducer.mean(),
kernel: ee.Kernel.square(250,"meters"),
}).reproject(DYM_2015.projection().atScale(1000)).rename("cultivated")
//Visualization
Map.centerObject(aoi, 12)
Map.addLayer(DYM_2015.randomVisualizer(), {}, 'DAYMET tmin')
Map.addLayer(CDL_2015.select("cultivated").eq(2), {min:0, max:1, opacity: 0.8, palette: ["beaed4","7fc97f"]}, "CDL coverage original")
Map.addLayer(image_frac.select("cultivated"), {min:0, max:1, opacity: 0.4}, "CDL coverage")
google-earth-engine resampling
add a comment |
I want to average a 30m raster at the resolution of a 1000m one. Specifically, I want to computer, for each Daymet raster cell, the percentage of cultivated land from the 30m CDL.
How can I do that in EarthEngine? My question very similar to one asked on the EE list. The author was exploring 3 solutions:
- A bilinear resample
- Reproject
- ReduceRegions, using a coarser raster that has been converted to features.
Someone gave an answer using reduceNeighborhood() to use a mean reducer, then reproject(), but it does not give quite the right result (see below, not right scale). How can I adjust that solution (I'm giving wrong scale parameters presumably?), or is there another solution that would be better?
Code
// DATA Import
var CDL = ee.ImageCollection("USDA/NASS/CDL")
var daymet = ee.ImageCollection("NASA/ORNL/DAYMET_V3").
filter(ee.Filter.calendarRange(2015, 2015, "year"))
var aoi = ee.Geometry.Polygon([[[-100.501, 42.9819],[-100.501, 42.4045], [-98.39, 42.40457], [-98.39, 42.98192]]])
var CDL_2015 = ee.Image("USDA/NASS/CDL/2015").select("cultivated").clip(aoi)
var DYM_2015 = ee.Image(daymet.first()).select("tmin").clip(aoi)
// Operation
var image_frac=CDL_2015.eq(2).reduceNeighborhood({
reducer: ee.Reducer.mean(),
kernel: ee.Kernel.square(250,"meters"),
}).reproject(DYM_2015.projection().atScale(1000)).rename("cultivated")
//Visualization
Map.centerObject(aoi, 12)
Map.addLayer(DYM_2015.randomVisualizer(), {}, 'DAYMET tmin')
Map.addLayer(CDL_2015.select("cultivated").eq(2), {min:0, max:1, opacity: 0.8, palette: ["beaed4","7fc97f"]}, "CDL coverage original")
Map.addLayer(image_frac.select("cultivated"), {min:0, max:1, opacity: 0.4}, "CDL coverage")
google-earth-engine resampling
add a comment |
I want to average a 30m raster at the resolution of a 1000m one. Specifically, I want to computer, for each Daymet raster cell, the percentage of cultivated land from the 30m CDL.
How can I do that in EarthEngine? My question very similar to one asked on the EE list. The author was exploring 3 solutions:
- A bilinear resample
- Reproject
- ReduceRegions, using a coarser raster that has been converted to features.
Someone gave an answer using reduceNeighborhood() to use a mean reducer, then reproject(), but it does not give quite the right result (see below, not right scale). How can I adjust that solution (I'm giving wrong scale parameters presumably?), or is there another solution that would be better?
Code
// DATA Import
var CDL = ee.ImageCollection("USDA/NASS/CDL")
var daymet = ee.ImageCollection("NASA/ORNL/DAYMET_V3").
filter(ee.Filter.calendarRange(2015, 2015, "year"))
var aoi = ee.Geometry.Polygon([[[-100.501, 42.9819],[-100.501, 42.4045], [-98.39, 42.40457], [-98.39, 42.98192]]])
var CDL_2015 = ee.Image("USDA/NASS/CDL/2015").select("cultivated").clip(aoi)
var DYM_2015 = ee.Image(daymet.first()).select("tmin").clip(aoi)
// Operation
var image_frac=CDL_2015.eq(2).reduceNeighborhood({
reducer: ee.Reducer.mean(),
kernel: ee.Kernel.square(250,"meters"),
}).reproject(DYM_2015.projection().atScale(1000)).rename("cultivated")
//Visualization
Map.centerObject(aoi, 12)
Map.addLayer(DYM_2015.randomVisualizer(), {}, 'DAYMET tmin')
Map.addLayer(CDL_2015.select("cultivated").eq(2), {min:0, max:1, opacity: 0.8, palette: ["beaed4","7fc97f"]}, "CDL coverage original")
Map.addLayer(image_frac.select("cultivated"), {min:0, max:1, opacity: 0.4}, "CDL coverage")
google-earth-engine resampling
I want to average a 30m raster at the resolution of a 1000m one. Specifically, I want to computer, for each Daymet raster cell, the percentage of cultivated land from the 30m CDL.
How can I do that in EarthEngine? My question very similar to one asked on the EE list. The author was exploring 3 solutions:
- A bilinear resample
- Reproject
- ReduceRegions, using a coarser raster that has been converted to features.
Someone gave an answer using reduceNeighborhood() to use a mean reducer, then reproject(), but it does not give quite the right result (see below, not right scale). How can I adjust that solution (I'm giving wrong scale parameters presumably?), or is there another solution that would be better?
Code
// DATA Import
var CDL = ee.ImageCollection("USDA/NASS/CDL")
var daymet = ee.ImageCollection("NASA/ORNL/DAYMET_V3").
filter(ee.Filter.calendarRange(2015, 2015, "year"))
var aoi = ee.Geometry.Polygon([[[-100.501, 42.9819],[-100.501, 42.4045], [-98.39, 42.40457], [-98.39, 42.98192]]])
var CDL_2015 = ee.Image("USDA/NASS/CDL/2015").select("cultivated").clip(aoi)
var DYM_2015 = ee.Image(daymet.first()).select("tmin").clip(aoi)
// Operation
var image_frac=CDL_2015.eq(2).reduceNeighborhood({
reducer: ee.Reducer.mean(),
kernel: ee.Kernel.square(250,"meters"),
}).reproject(DYM_2015.projection().atScale(1000)).rename("cultivated")
//Visualization
Map.centerObject(aoi, 12)
Map.addLayer(DYM_2015.randomVisualizer(), {}, 'DAYMET tmin')
Map.addLayer(CDL_2015.select("cultivated").eq(2), {min:0, max:1, opacity: 0.8, palette: ["beaed4","7fc97f"]}, "CDL coverage original")
Map.addLayer(image_frac.select("cultivated"), {min:0, max:1, opacity: 0.4}, "CDL coverage")
google-earth-engine resampling
google-earth-engine resampling
asked 7 mins ago
MatifouMatifou
699421
699421
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f319056%2fearthengine-average-reduce-a-raster-at-resolution-of-coarser-raster%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f319056%2fearthengine-average-reduce-a-raster-at-resolution-of-coarser-raster%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown