omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
723 stars 158 forks source link

support for optional jsonb_tags instead of hstore #268

Closed RobinKamps closed 3 years ago

RobinKamps commented 3 years ago

currently hstore extension is needed to import tags. however json columns provide more or less the same functionality. cockroachdb e.g. has no buioltin hstore functionality nor a hstore-extension, but instead could use jsonb columns for tags. is there a way to utilize json columns instead of hstore, or is this feature planned? Thanks in advance

ImreSamu commented 3 years ago

is there a way to utilize json columns instead of hstore,

imho: with a minimal Golang knowledge - it is easy to extend - with new columns types.

I have created an old - and not updated PR ( in 2016 )

RobinKamps commented 3 years ago

Thank you very much. It was indeed very easy to add a new column type directly to imposm (not as an addon/user custom type). After some additional tweaking of the sql dialect - some commands from imposm are not supported by cockroach e.g. "RESTART IDENTITY" or "DropGeometryTable" and a workaround to an annoying json escape problem on cockroach COPY, i finally got a working tag import with cockroach and jsonb instead of hstore.