1

我使用 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”不存在”

4

1 回答 1

1

请参阅gis.stackexchange.com 上的类似问题。引用答案

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

于 2019-06-03T13:27:49.190 回答