seanyx / rivwidthcloudpaper Goto Github PK
View Code? Open in Web Editor NEWA Google Earth Engine based algorithm that extracts river centerlines and widths from satellite images
License: Other
A Google Earth Engine based algorithm that extracts river centerlines and widths from satellite images
License: Other
// Assume 'aoi' is defined elsewhere in your script as your area of interest
var geometry = ee.Geometry.Rectangle([-89.60113734129604, 36.32131447834511, -89.48990076903041, 36.451768707535194]);
Map.addLayer(geometry)
Map.centerObject(geometry)
// Load the RivWidthCloud function library
var fns = require('users/eeProject/RivWidthCloudPaper:rwc_landsat.js');
// Load the image using its ID and clip it to the area of interest
var image = ee.Image("LANDSAT/LC08/C02/T1_L2/LC08_023034_20231002").clip(geometry);
// Setting the parameters for the RivWidthCloud (RWC) function
var rwc = fns.rwGenSR('Jones2019', 4000, 333, 500, geometry);
// Apply the RWC function to the clipped image
var widths = rwc(image);
// Remove the geometry before exporting the width as a CSV file
widths = widths.map(function(f) { return(f.setGeometry(null)); });
// Export the result as a CSV file into Google Drive
Export.table.toDrive({
collection: widths,
description: "Landsat_Widths",
folder: "asad",
fileNamePrefix: "widths",
fileFormat: "CSV"
});
"When I run this code for my study area using a single image it gives me this error, I even try this method, downloaded the image in assests and then I applied the code same error is coming."
I am working towards porting the existing Code Editor js support for Collection 2 images to the Python tooling. This repo might not be active any more but I'll submit a PR regardless. Development is happening at https://github.com/reredos/RivWidthCloudPaper/tree/jsta
该方法若将landsat数据替换成S2_SR数据,应该怎样实现呢
Hello,
I have been working with my student on applying this code to some locations in Somalia and Ethiopia. We have been using the javascript version described here. We are able to run your example, and get good data out, but when we run it for another location the code outputs an empty csv file with no data, not even the headers of the csv file.
You can see the location and landsat image we are using here.
I wondered if this was an issue in detecting rivers in arid landscapes, so I experimented with some reaches of rivers in locations to your example, but had the same problems.
Are you able to offer any insight into what we are doing wrong?
Many thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.