几何体的边太多(Google Earth Engine)。帮我
Geometry has too many edges (Google Earth Engine). Help me
我在使用 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 时遇到问题。我正在处理一些矢量文件。我得到以下代码:
几何体的顶点太多。您可以尝试使用以下方法简化它:
// 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});
});