Announcement : On
November 13, 2024 , all users will need to
use a Cloud project in order to access Earth Engine. After this date, continued individual access without a Cloud project will require
an exception .
Send feedback
ee.Algorithms.ObjectType
Stay organized with collections
Save and categorize content based on your preferences.
Returns a string representing the type of the given object.
Usage Returns ee.Algorithms.ObjectType(value )
String
Argument Type Details value
Object, default: null The object to get the type of.
Examples
Code Editor (JavaScript)
print ( ee . Algorithms . ObjectType ( 1 )); // The string "Integer"
print ( ee . Algorithms . ObjectType ( ee . Number ( 1 ))); // The string "Integer"
print ( ee . Algorithms . ObjectType ( ee . String ( 'a string' ))); // The string "String"
print ( ee . Algorithms . ObjectType ( ee . List ([ 1 , 'a string' ]))); // The string "List"
// ee.Algorithms.ObjectType can be used to get the type of properties
// of ee.Image or ee.Feature objects.
var feature = ee . Feature (
null , // No need for geometry in this example.
{
'int' : 42 ,
'int8' : ee . Number ( - 3 ). int8 (),
});
// The string "Integer"
print ( 'int:' , ee . Algorithms . ObjectType ( feature . get ( 'int' )));
// The string "Long"
print ( 'int8:' , ee . Algorithms . ObjectType ( feature . get ( 'int8' )));
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)
print ( ee . Algorithms . ObjectType ( ee . Number ( 1 )) . getInfo ()) # The string "Integer"
print (
ee . Algorithms . ObjectType ( ee . String ( 'a string' )) . getInfo ()
) # The string "String"
print (
ee . Algorithms . ObjectType ( ee . List ([ 1 , 'a string' ])) . getInfo ()
) # The string "List"
# ee.Algorithms.ObjectType can be used to get the type of properties
# of ee.Image or ee.Feature objects.
feature = ee . Feature (
None , # No need for geometry in this example.
{
'int' : 42 ,
'int8' : ee . Number ( - 3 ) . int8 (),
}
)
# The string "Integer"
print ( 'int:' , ee . Algorithms . ObjectType ( feature . get ( 'int' )) . getInfo ())
# The string "Long"
print ( 'int8:' , ee . Algorithms . ObjectType ( feature . get ( 'int8' )) . getInfo ())
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[],[]]