GEE使用表格生成要素集

使用表格生成要素集

主要功能

使用在線數(shù)據(jù)篩選生成要素集

代碼

// Create a FeatureCollection from a Fusion Table.

// Select "desert" features from the TNC Ecoregions fusion table.
var fc = ee.FeatureCollection('ft:1Ec8IWsP8asxN-ywSqgXWMuBaxI6pPaeh6hC64lA')
  .filter(ee.Filter.stringContains('ECO_NAME', 'desert'));

// Paint into a blank image.  Cast to byte() so we can use more than 1 color.
var image1 = ee.Image().byte().paint(fc, 'ECO_NUM');

// Display the image using random colors for each value.
Map.setCenter(-109.687, 30.524, 5);
Map.addLayer(image1.randomVisualizer());

步驟分析

  1. 使用在線數(shù)據(jù)循衰,篩選字段屬性
  2. 將篩選出的要素輸出到一個數(shù)據(jù)對象中
  3. 設(shè)置地圖中心,縮放等級
  4. 添加圖層,展示結(jié)果

主要方法

  1. ee.FeatureCollection()
    FeatureCollections can be constructed from the following arguments:
  • A string: assumed to be the name of a collection.
  • A single geometry.
  • A single feature.
  • A list of features.
  • A computed object: reinterpreted as a collection.
    Arguments:
    args (ComputedObject|Feature|FeatureCollection|Geometry|List<Object>|Number|String):
    The constructor arguments.
    column (String, optional):
    The name of the geometry column to use. Only useful with constructor type 1.
    Returns: FeatureCollection

創(chuàng)建要素集。

  1. ee.Filter.stringContains()
    Creates a unary or binary filter that passes if the left operand, a string, contains the right operand, also a string.
    Arguments:
    leftField (String, default: null):
    A selector for the left operand. Should not be specified if leftValue is specified.
    rightValue (Object, default: null):
    The value of the right operand. Should not be specified if rightField is specified.
    rightField (String, default: null):
    A selector for the right operand. Should not be specified if rightValue is specified.
    leftValue (Object, default: null):
    The value of the left operand. Should not be specified if leftField is specified.
    Returns: Filter

過濾器洼滚,判斷是否包含特定字符串。
輸入?yún)?shù):左屬性(字符串)琳轿,右值判沟,右屬性(字符串),左值

  1. ee.Image.paint()
    Paints the geometries of a collection onto an image.
    Arguments:
    this:image (Image):
    The image on which the collection is painted.
    featureCollection (FeatureCollection):
    The collection painted onto the image.
    color (Object, default: 0):
    Either the name of a color property or a number.
    width (Object, default: null):
    Either the name of a line-width property or a number.
    Returns: Image

將地理幾何要素輸出到為影像數(shù)據(jù)崭篡。
輸入?yún)?shù):影像(輸出結(jié)果)挪哄,要素集,顏色琉闪,寬度

  1. ee.Image.randomVisualizer()
    Creates a vizualization image by assigning a random color to each unique value of the pixels of the first band. The first three bands of the output image will contan 8-bit R, G and B values, followed by all bands of the input image.
    Arguments:
    this:image (Image):
    Image with at least one band.
    Returns: Image

對影像數(shù)據(jù)的第一波段中的不同值賦予隨機(jī)顏色輸出彩色圖像迹炼,輸出結(jié)果為8位RGB影像
輸入?yún)?shù):影像對象(需至少包含一個波段)

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市颠毙,隨后出現(xiàn)的幾起案子斯入,更是在濱河造成了極大的恐慌,老刑警劉巖蛀蜜,帶你破解...
    沈念sama閱讀 217,277評論 6 503
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件刻两,死亡現(xiàn)場離奇詭異,居然都是意外死亡滴某,警方通過查閱死者的電腦和手機(jī)磅摹,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,689評論 3 393
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來霎奢,“玉大人户誓,你說我怎么就攤上這事∧幌溃” “怎么了帝美?”我有些...
    開封第一講書人閱讀 163,624評論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長晤硕。 經(jīng)常有香客問我悼潭,道長庇忌,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,356評論 1 293
  • 正文 為了忘掉前任女责,我火速辦了婚禮漆枚,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘抵知。我一直安慰自己,他們只是感情好软族,可當(dāng)我...
    茶點故事閱讀 67,402評論 6 392
  • 文/花漫 我一把揭開白布刷喜。 她就那樣靜靜地躺著,像睡著了一般立砸。 火紅的嫁衣襯著肌膚如雪掖疮。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,292評論 1 301
  • 那天颗祝,我揣著相機(jī)與錄音浊闪,去河邊找鬼。 笑死螺戳,一個胖子當(dāng)著我的面吹牛搁宾,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播倔幼,決...
    沈念sama閱讀 40,135評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼盖腿,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了损同?” 一聲冷哼從身側(cè)響起翩腐,我...
    開封第一講書人閱讀 38,992評論 0 275
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎膏燃,沒想到半個月后茂卦,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,429評論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡组哩,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,636評論 3 334
  • 正文 我和宋清朗相戀三年等龙,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片禁炒。...
    茶點故事閱讀 39,785評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡而咆,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出幕袱,到底是詐尸還是另有隱情暴备,我是刑警寧澤,帶...
    沈念sama閱讀 35,492評論 5 345
  • 正文 年R本政府宣布们豌,位于F島的核電站涯捻,受9級特大地震影響浅妆,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜障癌,卻給世界環(huán)境...
    茶點故事閱讀 41,092評論 3 328
  • 文/蒙蒙 一凌外、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧涛浙,春花似錦康辑、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,723評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至我注,卻和暖如春按咒,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背但骨。 一陣腳步聲響...
    開封第一講書人閱讀 32,858評論 1 269
  • 我被黑心中介騙來泰國打工励七, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人奔缠。 一個月前我還...
    沈念sama閱讀 47,891評論 2 370
  • 正文 我出身青樓掠抬,卻偏偏與公主長得像,于是被迫代替她去往敵國和親添坊。 傳聞我的和親對象是個殘疾皇子剿另,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,713評論 2 354

推薦閱讀更多精彩內(nèi)容

  • pyspark.sql模塊 模塊上下文 Spark SQL和DataFrames的重要類: pyspark.sql...
    mpro閱讀 9,451評論 0 13
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,325評論 0 10
  • 我們總是有一種錯覺阳准; 我們總是以自己最不喜歡的方式成熟氛堕; 我們對未來認(rèn)知,一半為偏見野蝇,另外一半就是猜測讼稚; 未來總是...
    豐牛閱讀 140評論 0 1
  • 第二次學(xué)習(xí)的開始還是先熱身,隨后先復(fù)習(xí)上節(jié)課的直滑降幾趟绕沈,然后進(jìn)入今天的課程學(xué)習(xí)“J型轉(zhuǎn)彎”锐想,顧名思義,就是在直滑...
    yuzideyuzi閱讀 559評論 0 0
  • 1.基本概念:DOM事件的級別DOM0 element.onclick = function(){} 在js中:添...
    唐卡豆子閱讀 292評論 0 0