这是一段生成度量网格的代码。您必须在公制投影(例如 UTM)中定义坐标。
您可以在 K 和 K/5 间距处生成 2 个网格,并通过横截面计算出命名并在地图中使用 col 和 row 属性。
coveringGrid(proj, scale)
Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.
Arguments:
this:geometry (Geometry):
The result is the grid cells that intersect with this region.
proj (Projection):
The projection in which to construct the grid. A feature is generated for each grid cell that intersects 'geometry', where cell corners are at integer-valued positions in the projection. If the projection is scaled in meters, the points will be on a grid of that size at the point of true scale.
scale (Float, default: null):
Overrides the scale of the projection, if provided. May be required if the projection isn't already scaled.