美文网首页GEE案例
GEE数据集距离计算

GEE数据集距离计算

作者: 赤豆冰棍 | 来源:发表于2020-01-16 06:10 被阅读0次

标记特定像素

主要功能

标记大于1000m的像素点,标记等于1000m的像素点

代码

// 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. 创建ee对象,使用自定义坐标来创建的了点和线的混合要素集合。
  2. 计算与要素距离在设置范围中的部分。
  3. 添加图层,设置显示方式。

主要方法

  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.

计算两个地理要素之间的最小距离。
输入参数: 左操作数(计算结果)、右操作数(计算使用的要素)、容差、投影坐标系。
返回值:浮点型地理要素距离计算结果。

相关文章

  • GEE数据集距离计算

    标记特定像素 主要功能 标记大于1000m的像素点,标记等于1000m的像素点 代码 步骤分析 创建ee对象,使用...

  • GEE影像数据集裁剪

    影像数据集裁剪过滤 主要功能 对影像数据集进行要素裁剪,使用边界来获取特定区域数据。 代码 步骤分析 创建多边形对...

  • 应用层次聚类帮助老师实施差异化教学

    学习目标 什么是监督式学习与无监督学习? 聚类算法的作用? 如何通过『数据集』组件下载数据。 欧几里德距离计算。 ...

  • 初识Flink WaterMarker

    前言 对于流计算来说,最核心的概念就是无穷数据集,而用来处理无穷数据集的计算就可以称为流计算。面对无穷数据集,有多...

  • K均值聚类

    算法会将数据集分为 K 个簇,每个簇使用簇内所有样本均值来表示,将该均值称为“质心”距离计算方式是 欧式距离 a....

  • GEE学习笔记 一

    初识GEE GEE简介GEE应用范围GEE优缺点GEE初识 1.GEE是什么? GEE(全称Google Eart...

  • GEE学习笔记 零

    GEE初识 GEE示例以及学习资源介绍 GEE工作台介绍 GEE资源查找 GEE资源上传 GEE资源导出 GEE控...

  • 实现k临近算法

    欧式距离 给定一个训练数据集,对新的输入实例,计算两者之间的距离,与k个最小距离的标签进行分类。通俗来说即是点到直...

  • GEE学习笔记 八

    GEE的基本数据类型和语法介绍 这里罗列一些和JavaScript对应的GEE常见的数据类型,不包括Image、F...

  • GEE计算山体阴影

    使用高程数据来计算山体阴影 主要功能 使用高程数据来计算不同角度的山体阴影,并且在map中添加为多个图层展示。 代...

网友评论

    本文标题:GEE数据集距离计算

    本文链接:https://www.haomeiwen.com/subject/czhyrqtx.html