[OSM-dev] osm2pgsql hstore support

Martijn van Oosterhout kleptog at gmail.com
Sun Mar 14 16:06:53 GMT 2010


Very cool. Now we just need to find a way to use it. I thought about
it earlier but I didn't see a way to make mapnik use it so left it.

Have a nice day,

On Sun, Mar 14, 2010 at 4:47 PM, Sven Geggus
<lists at fuchsschwanzdomain.de> wrote:
> Hello,
>
> I just commited a patch for osm2pgsl for optional generation of a
> hstore column (hstore new).
>
> For those of you who don't know about hstore colums yet:
>
> Hstore is for sets of key/value pairs. As associative array datatype,
> just like a hash in perl or dictionary in python.
>
> This should come in handy especialy for rarely used tags.
>
> Using hstore one can use any tag in sql queries like this:
>
> gis=> select count(*) FROM planet_osm_point where ((tags->'man_made') = 'tower');
>  count
> -------
>   447
> (1 Zeile)
>
> Indexes can be added to hstores as well.
>
> Currently the patch has not been tested in conjunction with
> incemental database updates.
>
> Regards
>
> Sven
>
>
> --
> "Those who do not understand Unix are condemned to reinvent it, poorly"
> (Henry Spencer)
>
> /me is giggls at ircnet, http://sven.gegg.us/ on the Web
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>



-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/




More information about the dev mailing list