[Tile-serving] [openstreetmap/osm2pgsql] A new option to use JSONb instead hstore (#672)

ImreSamu notifications at github.com
Sat Jan 21 15:38:57 UTC 2017


@ppKrauss 
> It is about "user community", JSON community is bigger tham HStore.

I think the similar issue will be in the future with:  [WKB](https://en.wikipedia.org/wiki/Well-known_text)  vs  [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON)    

imho:      my quick & dirty solution  -  is  just creating  a  simple `view` :  
```sql
CREATE VIEW planet_osm_point_json   AS SELECT hstore_to_json(tags) as json_tags , ST_AsGeoJSON(way) as osm_geojson,*  FROM planet_osm_point ;
CREATE VIEW planet_osm_line_json    AS SELECT hstore_to_json(tags) as json_tags , ST_AsGeoJSON(way) as osm_geojson,*  FROM planet_osm_line ;
CREATE VIEW planet_osm_polygon_json AS SELECT hstore_to_json(tags) as json_tags , ST_AsGeoJSON(way) as osm_geojson,*  FROM planet_osm_polygon ;
CREATE VIEW planet_osm_roads_json   AS SELECT hstore_to_json(tags) as json_tags , ST_AsGeoJSON(way) as osm_geojson,*  FROM planet_osm_roads ;
```

And probably we can create a document about the best practices  (  `./docs/json_processing.md`  )  




-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/672#issuecomment-274268877
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20170121/e40791ff/attachment.html>


More information about the Tile-serving mailing list