gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 08:51:47 24 4
gpt4 key购买 nike

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com