postgresql - 在 Windows 上使用 osm2pgsql 将 .osm.bz2 转换并导入到 postGis 失败

标签 postgresql postgis openstreetmap

我对这一切都是陌生的。我按照教程 http://www.spatialanalysis.ca/2011/using-openstreetmap-data-part1/ 做了下一步:

-安装postGIS/postgreSql, PROJ4;

-从cloudmade保存的链接;

-创建数据库gis;

最后在cmd中做了这个 osm2pgsql -d gis -U postgres -P 5432 grad_beograd.osm.bz2

并显示错误 Using projection SRS 900913 (Spherical Mercator) 无法打开样式文件“/usr/share/osm2pgsql/default.style”:没有这样的文件或 d 目录 发生错误,正在清理

我的操作系统是 WindowsXP

寻求帮助。提前致谢!

最佳答案

您需要添加 -S 标志并指向 default.style 文件的位置 - 尝试使用 osm2pqsql -h 命令,它会告诉你:

 -S|--style       Location of the style file. Defaults to
                        default.style.

确保你真的有这个文件,上面的教程并没有真正告诉你从哪里得到它,我必须安装 HOTOSM 才能得到 default.style 文件,我只是复制了它与 OSM 数据一起放入我的文件夹中。

关于postgresql - 在 Windows 上使用 osm2pgsql 将 .osm.bz2 转换并导入到 postGis 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17411543/

相关文章:

postgresql - Python SQLAlchemy : Mapping a PostGIS geom field

c# - 在 PostgreSQL 查询中将日期时间转换为指定格式

c# - 无法永久更改 search_path

java - Apache 卡宴/PostgreSQL : "too many clients already" error

linux - 从 postgresql 9.3 迁移到 9.4,postgis

dictionary - JTileDownloader 被 Mapnik 禁止

android - 检测 OSM Mapview 是否仍在加载或不在 android 中

postgresql - 为什么我的 postgis 不在几何字段上使用索引?

postgresql - 将 OSM 文件导入 Windows10 上的 PostGis

javascript - 如何使用 OSM 在当前位置放置标记?