Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 plotKML 包将许多 shapefile 写入 KML 文件。shapefile 仅包含二维坐标(经度和纬度)。plotKML 包支持从空间对象读取第三维(海拔或高度)并将其写入 KML 文件。
我的计划是遍历 shapefile 并创建缺少第三维的新 SpatialPolygonsDataFrames(高度数据包含在“数据”槽中),但 Polygon() 函数明确指出 coords 参数必须是“ 2列数字”带坐标的矩阵”。
如何创建具有三列坐标矩阵的多边形?
根据设计,sp 不支持这一点。包 sf 支持多边形节点 (POLYGON Z) 中的三维坐标,但这确实是 plotKML 不支持的。