GEE缓冲区

要素缓冲区功能实现

主要功能

对指定要素执行缓冲区分析。
获取旧金山BART点位置,做2KM缓冲区,显示结果。

代码

// Feature buffer example.
// Display the area within 2 kilometers of San Francisco BART stations.

// Instantiate a FeatureCollection of BART locations in Downtown San Francisco
// (points).
var stations = [
  ee.Feature(
      ee.Geometry.Point(-122.42, 37.77), {'name': '16th St. Mission (16TH)'}),
  ee.Feature(
      ee.Geometry.Point(-122.42, 37.75), {'name': '24th St. Mission (24TH)'}),
  ee.Feature(
      ee.Geometry.Point(-122.41, 37.78),
      {'name': 'Civic Center/UN Plaza (CIVC)'})
];
var bartStations = ee.FeatureCollection(stations);

// Map a function over the collection to buffer each feature.
var buffered = bartStations.map(function(f) {
  return f.buffer(2000, 100); // Note that the errorMargin is set to 100.
});

Map.addLayer(buffered, {color: '800080'});

Map.setCenter(-122.4, 37.7, 11);

步骤分析

  1. 创建地理要素集,使用自定义坐标,属性
  2. 对要素集执行缓冲区
  3. 添加缓冲区图层
  4. 设置地图中心,缩放等级

主要方法

  1. ee.Feature.buffer()
    Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
    Arguments:
    this:feature (Element): The feature the geometry of which is being buffered.
    distance (Float): The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
    maxError (ErrorMargin, default: null): The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
    proj (Projection, default: null): If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
    Returns: Feature

缓冲区功能,对地理要素进行换出去分析。
输入参数:进行缓冲区分析的地理要素,缓冲区分析距离,容差,坐标系

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,211评论 0 10
  • The Inner Game of Tennis W Timothy Gallwey Jonathan Cape ...
    网事_79a3阅读 14,328评论 3 20
  • 每天忙忙碌碌,每天抱怨生活对自己不公,却从不做半点改变,活该自己在原地踏步。这就是所谓的高不成低不就吧。
    矫情的我A阅读 1,950评论 0 0
  • 时光是把刀,而我仿佛是尊沉闷又笨重的大理石。不愿别人用属于他们的时光刀来雕琢自己!因他们只会按自己的想法来雕琢,在...
    纤素核阅读 2,361评论 0 1
  • 其实本章并不是解释快的原因,只是我带着这个问题,看完了这篇博客。这篇博客是google拿来的,做了些许改动。写的不...
    scandly阅读 6,318评论 0 3

友情链接更多精彩内容