当前位置:网站首页>Gee import SHP data - crop image
Gee import SHP data - crop image
2022-07-04 02:08:00 【RS&Hydrology】
1.Importing Table Data:https://developers.google.com/earth-engine/guides/table_upload
Attention should be paid to importing shp When you file , Need to include .shp, .dbf, .shx, .prj Four files are compressed into zip File re import .
2. Vector data crop image
(1) Crop image set
First, define a function to crop a single image , Then apply this function to the data set .
//shp
var tp = ee.FeatureCollection(table)
// show jrc monthly history dataset
var dataset = ee.ImageCollection('JRC/GSW1_3/MonthlyHistory')
.filterDate('2010-01-01','2020-12-31')
.filterBounds(tp);
//use shp file to clip the jrc dataset
//define clip function to clip a image
function clipImg(image){
return image.clipToCollection(tp);
}
var clipCol=dataset.map(clipImg);
var visParams={
bands: ['water'],
min: 0.0,
max: 2.0,
palette: ['ffffff', 'fffcb8', '0905ff']
};
print(clipCol);
Map.addLayer(clipCol,visParams,"clip ImgCol");

(2) Crop a single image
Using vector data to crop a single image is relatively simple , Directly use the clipping function :clipToCollection
var clip=data.clipToCollection(shp_file);
边栏推荐
- I don't know why it can't run in the project and how to change it
- [leetcode daily question] a single element in an ordered array
- Sword finger offer 14- I. cut rope
- Cancer biopsy instruments and kits - market status and future development trends
- 2022 new examination questions for safety management personnel of hazardous chemical business units and certificate examination for safety management personnel of hazardous chemical business units
- Day05 branch and loop (II)
- On Valentine's day, I code a programmer's exclusive Bing Dwen Dwen (including the source code for free)
- 2020-12-02 SSM advanced integration Shang Silicon Valley
- All ceramic crowns - current market situation and future development trend
- Pyrethroid pesticide intermediates - market status and future development trend
猜你喜欢

Magical usage of edge browser (highly recommended by program ape and student party)

MPLS③

C learning notes: C foundation - Language & characteristics interpretation

Hbuilder link Xiaoyao simulator

Applet graduation project based on wechat selection voting applet graduation project opening report function reference

Small program graduation project based on wechat video broadcast small program graduation project opening report function reference

Yyds dry goods inventory hand-in-hand teach you the development of Tiktok series video batch Downloader

Force buckle day32

17. File i/o buffer

Idea if a class cannot be found, it will be red
随机推荐
The difference between int (1) and int (10)
Containerization technology stack
Idea if a class cannot be found, it will be red
Small program graduation project based on wechat e-book small program graduation project opening report function reference
Sword finger offer 20 String representing numeric value
Cancer biopsy instruments and kits - market status and future development trends
A. ABC
Feign implements dynamic URL
Three layer switching ①
Huawei cloud micro certification Huawei cloud computing service practice has been stable
The latest analysis of hoisting machinery command in 2022 and free examination questions of hoisting machinery command
Remember another interview trip to Ali, which ends on three sides
I don't know why it can't run in the project and how to change it
Mysql-15 aggregate function
Bacteriostatic circle scanning correction template
Trading software programming
Intel's new GPU patent shows that its graphics card products will use MCM Packaging Technology
G3 boiler water treatment registration examination and G3 boiler water treatment theory examination in 2022
Chain ide -- the infrastructure of the metauniverse
The boss said: whoever wants to use double to define the amount of goods, just pack up and go