geospatial - 在 GeoDMS 中,如何将字符串坐标转换为 dpoint?
问题描述
我在 GeoDMS GUI 版本 7.177 中将字符串格式的坐标转换为 dpoint 格式时遇到问题。
我正在尝试直接从 Kadaster 将 BAG(basisadministratie gemeenten,荷兰市政当局,一个巨大的地理文件)读入 GeoDMS。它首先从 .xml 转换为 .csv,然后将建筑物的形状转换为与 Vesta 格式相同的格式,例如:
{5:{249943.307,593511.272}{249948.555,593512.791}{249946.234,593520.809}{249940.987,593519.29}{249943.307,593511.272}}
我能够将转换后的 CSV 文件读入 GeoDMS,然后还能够将其作为字符串写入 .dmsdata 格式以提高速度,然后再次将其加载到 GeoDMS 中。但是,当想要将字符串转换为坐标时,出现错误
DPoint Error: Cannot find operator for these arguments:
arg1 of type DataItem<String>
Possible cause: argument type mismatch. Check the types of the used arguments.
我的 GeoDMS 代码看起来像
unit<uint32> altBag:
storageName = 'c:/zandbak/output/bagPND.fss'
, storageReadOnly = 'true'
, dialogType = 'map'
, dialogData = 'geometry'
{
attribute <string> pandGeometrie; // works and looks good
attribute <dpoint> geometry := dpoint(pandGeometrie); // doesn't work, error above
attribute <rdc> geometry2 := pandGeometrie[rdc]; // doesn't work either
}
有没有办法做到这一点?还是不支持字符串到 dpoint(或其他类型的点),我应该先将 CSV 转换为形状文件吗?
解决方案
你可以试试这个:
attribute<dpoint> Geometry(poly) := dpolygon(GeometryStr);
如果需要特定的投影:
attribute<rdc_meter> Geometry2(poly) := value(GeometryStr, rdc_meter);
推荐阅读
- mongodb - 与 vpc 对等的 atlas 集群未将 docker swarm 上的服务列入白名单
- arrays - Vue.js - 如果它们具有相同的标题,则显示更多来自数组的对象
- javascript - 什么是函数的大 O
- python - cython 中的异常处理
- ruby-on-rails - 如何运行 rake 运动鞋:运行
- android - Flutter local_auth 无法使用默认系统对话框进行指纹识别
- python - 将 2 个不同的行更改为单行而不在 Pandas 中进行旋转(当数据框不是 Mulitindex 时)
- javascript - 当我更新相机时,Raycaster 不会停留在中心
- angular - 如何在角度垫步进器中禁用步骤标题中的特定步骤
- python - 基于python中的计数的计时器