当前位置:网站首页>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);
边栏推荐
- Why can't it run (unresolved)
- [software implementation series] software implementation interview questions with SQL joint query diagram
- 14. Process time
- Flex flexible layout, box in the middle of the page
- Containerization technology stack
- 13. Time conversion function
- Advanced learning of MySQL -- Application -- index
- Maximum entropy model
- What are the advantages and disadvantages of data center agents?
- Reading notes - learn to write: what is writing?
猜你喜欢

ES6 deletes an attribute in all array objects through map, deconstruction and extension operators

16. System and process information

SRCNN:Learning a Deep Convolutional Network for Image Super-Resolution
![[leetcode daily question] a single element in an ordered array](/img/3a/2b465589b70cd6aeec08e79fcf40d4.jpg)
[leetcode daily question] a single element in an ordered array

Example 073 square sum value judgment programming requires the input of a and B, if a ²+ b ² If the result of is greater than 100, a is output ²+ b ² Value, otherwise output the result of a + B.

Example 072 calculation of salary it is known that the base salary of an employee of a company is 500 yuan. The amount of software sold by the employee and the Commission method are as follows: Sales

Introduction to graphics: graphic painting (I)

Maximum likelihood method, likelihood function and log likelihood function

Introduction to superresolution

The automatic control system of pump station has powerful functions and diverse application scenarios
随机推荐
Valentine's Day - 9 jigsaw puzzles with deep love in wechat circle of friends
Small program graduation project based on wechat reservation small program graduation project opening report reference
Human resource management online assignment
[leetcode daily question] a single element in an ordered array
Override and virtual of classes in C #
Openbionics robot project introduction | bciduino community finishing
Will the memory of ParticleSystem be affected by maxparticles
Containerization technology stack
Advanced learning of MySQL -- Application -- index
60 year old people buy medical insurance and recommend a better product
16. System and process information
Pytoch residual network RESNET
Why can't it run (unresolved)
2022 electrician (elementary) examination question bank and electrician (elementary) simulation examination question bank
Douban scoring applet Part-3
1189. Maximum number of "balloons"
Chinese Mitten Crab - current market situation and future development trend
TP5 automatic registration hook mechanism hook extension, with a complete case
Remember another interview trip to Ali, which ends on three sides
Three layer switching ①