公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Feature.cutLines
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
通过将 LineString、MultiLineString 和 LinearRing 几何图形沿其长度切割成不超过指定距离的部分,将其转换为 MultiLineString。所有其他几何图形类型都将转换为空的 MultiLineString。
用法 | 返回 |
---|
Feature.cutLines(distances, maxError, proj) | 功能 |
参数 | 类型 | 详细信息 |
---|
此:feature | 元素 | 剪切相应地图项默认几何图形的线条。 |
distances | 列表 | 沿每条 LineString 的距离,用于将该线切割成单独的片段,以指定投影的单位或米为单位(如果未指定投影)。 |
maxError | ErrorMargin,默认值:null | 执行任何必要的重新投影时可容忍的最大误差量。 |
proj | 投影,默认值:null | 结果和距离测量的投影,如果未指定,则为 EPSG:4326。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe function \u003ccode\u003ecutLines\u003c/code\u003e converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by segmenting them into shorter lengths.\u003c/p\u003e\n"],["\u003cp\u003eSegmentation is determined by the \u003ccode\u003edistances\u003c/code\u003e parameter, specifying the length of each segment in the projection units or meters.\u003c/p\u003e\n"],["\u003cp\u003eGeometries other than LineString, MultiLineString, and LinearRing are converted into an empty MultiLineString.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify the \u003ccode\u003emaxError\u003c/code\u003e for reprojection and the \u003ccode\u003eproj\u003c/code\u003e for distance measurements and output projection.\u003c/p\u003e\n"]]],["The core functionality involves cutting `LineString`, `MultiLineString`, and `LinearRing` geometries into segments based on specified distances. The `cutLines` method, applied to a `Feature`, takes a list of `distances` and divides the line into parts no longer than those distances. `maxError` handles reprojection errors, while `proj` defines the projection for distance measurements, defaulting to EPSG:4326. Other geometry types become empty `MultiLineString`s.\n"],null,["# ee.Feature.cutLines\n\nConverts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------------------------------|---------|\n| Feature.cutLines`(distances, `*maxError* `, `*proj*`)` | Feature |\n\n| Argument | Type | Details |\n|-----------------|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `feature` | Element | Cuts the lines of this feature's default geometry. |\n| `distances` | List | Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified. |\n| `maxError` | ErrorMargin, default: null | The maximum amount of error tolerated when performing any necessary reprojection. |\n| `proj` | Projection, default: null | Projection of the result and distance measurements, or EPSG:4326 if unspecified. |"]]