公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Feature.simplify
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
将地图项的几何图形简化到给定的误差范围内。请注意,除非明确将 maxError 指定为 null,否则此方法不会考虑相应算法的使用者请求的误差边际。
这会替换用于传播误差边际的默认 Earth Engine 政策,因此无论从输出中请求的几何图形精度如何,系统都会根据此算法的实参中指定的误差边际来请求输入。这样一来,渲染的矢量地图在所有缩放级别都能保持一致的渲染效果,但在较低的缩放级别(即缩小)下,几何图形不会简化,这可能会影响性能。
用法 | 返回 |
---|
Feature.simplify(maxError, proj) | 功能 |
参数 | 类型 | 详细信息 |
---|
此:feature | 元素 | 要简化几何图形的地图项。 |
maxError | ErrorMargin | 结果与输入之间可能存在的最大误差。 |
proj | 投影,默认值:null | 如果指定了此参数,结果将采用此投影。否则,它将与输入处于同一投影中。如果误差边际采用的是预测单位,则边际将解读为相应预测的单位。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eSimplifies feature geometry within a specified error margin, potentially overriding user-requested accuracy.\u003c/p\u003e\n"],["\u003cp\u003eInput geometries are processed with the algorithm's specified error margin, ensuring consistent rendering across zoom levels.\u003c/p\u003e\n"],["\u003cp\u003eWhile potentially impacting performance at lower zoom levels, the algorithm prioritizes consistent visual representation.\u003c/p\u003e\n"],["\u003cp\u003eUses \u003ccode\u003emaxError\u003c/code\u003e to control simplification level and an optional \u003ccode\u003eproj\u003c/code\u003e parameter to manage projection for the resulting geometry.\u003c/p\u003e\n"],["\u003cp\u003eDirectly accessible through the \u003ccode\u003eFeature.simplify()\u003c/code\u003e method, taking \u003ccode\u003emaxError\u003c/code\u003e and an optional \u003ccode\u003eproj\u003c/code\u003e as arguments, and returning a simplified \u003ccode\u003eFeature\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# ee.Feature.simplify\n\nSimplifies the geometry of a feature to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.\n\n\u003cbr /\u003e\n\nThis overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.\n\n| Usage | Returns |\n|----------------------------------------|---------|\n| Feature.simplify`(maxError, `*proj*`)` | Feature |\n\n| Argument | Type | Details |\n|-----------------|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `feature` | Element | The feature whose geometry is being simplified. |\n| `maxError` | ErrorMargin | The maximum amount of error by which the result may differ from the input. |\n| `proj` | Projection, default: null | If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection. |"]]