google-earth-engine - 几何图形有太多边缘(Google Earth Engine)。帮我

标签 google-earth-engine

enter image description here

我在使用 Google Earth Engine 时遇到问题。我正在处理一些矢量文件。我得到以下代码:

最佳答案

几何图形有太多顶点。您可以尝试使用以下方法来简化它:

// Get a feature collection and subset the first feature.
var feature = ee.FeatureCollection("TIGER/2018/States").first();

// Simplify the feature - think of max error as resolution.
// Setting to 100 means that the geometry is accurate to
// within 100 meters, for example.
var featureSimple = ee.Feature(feature).simplify({maxError: 100});

或者对于ee.FeatureCollection:

// Get a feature collection.
var featureCol = ee.FeatureCollection("TIGER/2018/States");

// Simplify each feature in the collection, by mapping the
// .simplify() function over it. 
var simplifiedCol = featureCol.map(function(feature) {
  return feature.simplify({maxError: 100});
});

关于google-earth-engine - 几何图形有太多边缘(Google Earth Engine)。帮我,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58490964/

相关文章:

google-earth-engine - 使用 Google Earth Engine 的 python api 进行图像分类

mask - 哪个函数适用于云掩蔽

javascript - 是否有通过陆地卫星开发 30 年 NDVI 数据的代码?

javascript - 谷歌地球引擎: Getting time series for reduceRegion

python - Google Earth Engine 上是否有按几何图形选项叠加或连接?

python - 谷歌地球引擎 : Time series of reduceRegion()

javascript - 如何重命名从Reducer.mean 获得的平均值?

python - StringIO 导入 ee 时出现问题,尽管可以单独导入

javascript - 将 Earth Engine javascript 库导入到另一个 javascript 文件中

python - Collection.loadTable : not found in GEE