ee.Number.first

  • Number.first selects the value of the first value.

  • The first method is available in both JavaScript and Python APIs for Earth Engine.

  • Examples demonstrate that applying first to two numbers returns the first number.

Selects the value of the first value.
Usage Returns
Number. first (right) Number
Argument Type Details
this: left
Number The left-hand value.
right
Number The right-hand value.

Examples

Code Editor (JavaScript)

 print 
 ( 
 ee 
 . 
 Number 
 ( 
 1 
 ). 
 first 
 ( 
 ee 
 . 
 Number 
 ( 
 2 
 ))); 
  
 // 1 

Python setup

See the Python Environment page for information on the Python API and using geemap for interactive development.

 import 
  
 ee 
 import 
  
 geemap.core 
  
 as 
  
 geemap 

Colab (Python)

 display 
 ( 
 ee 
 . 
 Number 
 ( 
 1 
 ) 
 . 
 first 
 ( 
 ee 
 . 
 Number 
 ( 
 2 
 ))) 
 # 1 
Design a Mobile Site
View Site in Mobile | Classic
Share by: