【问题标题】:Query not exposed attributes from PostGIS从 PostGIS 查询未公开的属性
【发布时间】:2019-10-16 01:17:43
【问题描述】:

我使用 osm2pgsql 将 osm 文件加载到 PostGIS。现在,我想查询具有特定属性的特征。例如:“highway is not null”和“maxspeed is not null”。 PGadmin 返回:“错误:列“maxspeed”不存在”

从我知道的 overpass-turbo 中,我感兴趣的领域提供了这样的特征。 所以应该在场。

select * from planet_osm_line
where highway is not null and maxspeed is not null

我希望查询结果带有“maxspeed”的附加属性列,但是 PGadmin 返回:“错误:列“maxspeed”不存在”

【问题讨论】:

  • 检查确切的列名

标签: postgis openstreetmap qgis osm2pgsql


【解决方案1】:

查看similar question at gis.stackexchange.com。引用answer

default.style 文件 https://github.com/openstreetmap/osm2pgsql/blob/master/default.style 不选择 maxspeed 到它自己的列。编辑 default.style 或使用 将所有标签写入 hstore 的 --hstore 选项。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-11
    • 2018-11-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多