GEE數(shù)據(jù)集距離計(jì)算

標(biāo)記特定像素

主要功能

標(biāo)記大于1000m的像素點(diǎn),標(biāo)記等于1000m的像素點(diǎn)

代碼

// Collection.distance example.
// Computes the distance to the nearest feature in a collection.

// Construct a FeatureCollection from a list of geometries.
var fc = ee.FeatureCollection([
  ee.Geometry.Point(-72.94411, 41.32902),
  ee.Geometry.Point(-72.94411, 41.33402),
  ee.Geometry.Point(-72.94411, 41.33902),
  // The geometries do not need to be the same type.
  ee.Geometry.LineString(
      -72.93411, 41.30902, -72.93411, 41.31902, -72.94411, 41.31902)
]);

// Compute distance from the dfeatures, to a max of 1000 meters.
var distance = fc.distance(1000, 100);

Map.setCenter(-72.94, 41.32, 13);
Map.addLayer(distance, {min: 0, max: 1000, palette: ['yellow', 'red']});
Map.addLayer(fc);

步驟分析

  1. 創(chuàng)建ee對(duì)象,使用自定義坐標(biāo)來(lái)創(chuàng)建的了點(diǎn)和線的混合要素集合。
  2. 計(jì)算與要素距離在設(shè)置范圍中的部分。
  3. 添加圖層,設(shè)置顯示方式。

主要方法

  1. ee.feature.distance()
    Returns the minimum distance between the geometries of two features.
    Arguments:
    this:left (Element): The feature containing the geometry used as the left operand of the operation.
    right (Element): The feature containing the geometry used as the right operand of the operation.
    maxError (ErrorMargin, default: null): The maximum amount of error tolerated when performing any necessary reprojection.
    proj (Projection, default: null): The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.

計(jì)算兩個(gè)地理要素之間的最小距離。
輸入?yún)?shù): 左操作數(shù)(計(jì)算結(jié)果)、右操作數(shù)(計(jì)算使用的要素)、容差、投影坐標(biāo)系。
返回值:浮點(diǎn)型地理要素距離計(jì)算結(jié)果。

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • d3 (核心部分)選擇集d3.select - 從當(dāng)前文檔中選擇一系列元素。d3.selectAll - 從當(dāng)前文...
    謝大見(jiàn)閱讀 3,585評(píng)論 1 4
  • 聲明:作者翻譯論文僅為學(xué)習(xí),如有侵權(quán)請(qǐng)聯(lián)系作者刪除博文,謝謝! 翻譯論文匯總:https://github.com...
    SnailTyan閱讀 12,938評(píng)論 3 12
  • 以前我對(duì)自己的未來(lái)無(wú)數(shù)次想象過(guò) 會(huì)做什么工作 遇見(jiàn)什么樣的人 過(guò)什么樣的生活 我統(tǒng)統(tǒng)都幻想過(guò) 給自己假設(shè)了很多各種...
    小緈運(yùn)閱讀 246評(píng)論 0 0
  • 看完第四章了,邊看也邊在想,這位老師看來(lái)真不打算重復(fù)《真》里面的內(nèi)容。 要想獲得緊密充滿(mǎn)愛(ài)的婚姻, 兩者的比例 需...
    周娜Zhou閱讀 224評(píng)論 0 0
  • 中學(xué)畢業(yè)那一年, 父親給予的一次旅行獎(jiǎng)勵(lì)喚醒了我看世界的心。 那一年, 我十五歲, 爸爸為獎(jiǎng)勵(lì)我以?xún)?yōu)秀的成績(jī)中學(xué)畢...
    綠洲玫瑰閱讀 1,151評(píng)論 2 4

友情鏈接更多精彩內(nèi)容