从OpenStreetMap中取出水后,我失去了管理边界和属性。如何保存它们?

发布于 2025-02-11 14:58:09 字数 515 浏览 0 评论 0原文

现在,我正在从OpenStreetMap中处理印尼的地图数据。我得到了admin_level等于“ 4”的区域数据。然后,我通过这种方式将水部分删除,https://stackoverflow.com/questions/25297811/25297811/how-can-i-remove-water-from-openstreetmap-ways.ut我丢失了行政界限。我有一些建议重新定位它们。 我的目标只是从原始数据中删除水部分。 首先,我从OpenStreetMap获取印度尼西亚的PBF数据。 其次,我通过python脚本从PBF中获得了多龙:

第三,我通过Ogr2ogr删除了水部分。

ogr2ogr -f GeoJSON ID_filter_level_44.geo.json -clipsrc ID_level_4.geo.json land_polygons.id.shp 

现在,我得到了文件ID_FILTER_LEVEL_44.GEO.JSON,但它的几何形状都是“ Polygon”类型。并合并了一些不同的管理。

now I am handling the indonesia's map data from openstreetmap. I get the region datas whose admin_level equals "4". Then I remove the water part through this way,https://stackoverflow.com/questions/25297811/how-can-i-remove-water-from-openstreetmap-ways.But I lose the administrative boundary,either.Who can give me some suggestion to resave them.
My target is just to remove the water part from the original data.
Firstly, I get the pbf data of Indonesia from openstreetmap.
secondly, I get the multipolygons from the pbf through a python script:

thirdly, I remove the water part by ogr2ogr.

ogr2ogr -f GeoJSON ID_filter_level_44.geo.json -clipsrc ID_level_4.geo.json land_polygons.id.shp 

And now, I get the file ID_filter_level_44.geo.json, but it's geometry is all "polygon" type. and some diffrent administration are merged.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文