[OSM-talk] osm2pgsql hstore (was: Wind turbines no longer rendered on mapnik layer)

Frederik Ramm frederik at remote.org
Thu Feb 16 18:51:23 GMT 2012


Hi,

On 02/16/2012 07:25 PM, Graham Jones wrote:
> This reminded me of a question I have been meaning to ask for quite a
> while - is a database generated by osm2pgsql with an hstore expected to
> perform similarly to one without?

I never ran one with hstore when I think of what this must mean for the 
database engine, and storage space, then I shudder and would not be 
surprised by the factor 5 you mentioned.

> I keep having to re-import my database to add new keys.

If you want to add a new key but avoid re-importing the full database, 
you can add the key to osm2pgsql's style file, somehow generate an .osm 
file that contains only the objects that have this tag, wrap this .osm 
file into a "<osmChange><modify>...</modify></osmChange>" instead of 
"<osm>...</osm>" and throw it at osm2pgsql in append mode.

> power_source is much more generic so you could re-cycle
> it for things like district heating, but generator:power_source is only
> ever going to be used for generating stations, and needs a new column in
> the database.

Yes, that's the plan I believe. People like keys that are understandable 
without context. Contrast this with a tag "width=2" - where you have no 
chance in knowing what it means without looking at the whole thing.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"



More information about the talk mailing list