Skip to content

Instantly share code, notes, and snippets.

@rrzefox
rrzefox / modified-osm2pgsql.style
Created November 27, 2015 13:51
modified osm2pgsql style that removes all non-frequently used tags so that they end up in hstore instead
# This is a modification of the default osm2pgsql .style file that comes with osm2pgsql.
#
# A .style file has 4 columns that define how OSM objects end up in tables in
# the database and what columns are created. It interacts with the command-line
# hstore options.
#
# Columns
# =======
#
# OsmType: This is either "node", "way" or "node,way" and indicates if this tag
@rrzefox
rrzefox / create-views.sql
Created November 27, 2015 14:19
view to map the columns of default osm2pgqsql style to a hstore-modified one
drop view view_osm_polygon;
create view view_osm_polygon as
select
osm_id,
"access",
tags->'addr:housename' as "addr:housename",
"addr:housenumber",
"addr:interpolation",
admin_level,
tags->'aerialway' as aerialway,