Displaying raster tiles from OSM data stored in a postgis server

المشرف العام

Administrator
طاقم الإدارة
I have been recently tasked with setting up a raster tile server that serves tiles from data pulled from a postgis store.

I have managed to get a vector tile server up and running but I'm stuck on the raster tile server bit. This is what the raw data looks like (an example row, it's basically a list of all the streets in Switzerland):

{ id: 1537021, osm_id: '317400638', osm_name: null, osm_meta: null, osm_source_id: '3236568222', osm_target_id: '3236568210', clazz: 72, flags: 6, source: 1216745, target: 1216746, km: 0.048946153, kmh: 10, cost: 0.004894615, reverse_cost: 0.004894615, x1: 8.1708598, y1: 47.4290024, x2: 8.1707774, y2: 47.4285814, geom_way: '0102000020E610000003000000F7668AEF7A572040E8F3F68CE9B64740AEC2C1397E572040DBAC5516E0B64740B5CAA7227057204042565CC1DBB64740' }What would be the best approach to generate raster tiles given this data?

I managed to cook up vector geoJSON data via the following:

SELECT osm_name As properties, ST_ASGEOJSON(geom_way) as geometry FROM ch_2po_4pgr WHERE ST_Intersects(ch_2po_4pgr.geom_way, ST_SetSRID(ST_MakeBox2D(ST_Point($1, $2), ST_Point($3, $4)), 4326))Most tutorials seem to deal with using Mapnik and a shapefile datasource but what I have is this postgis table :(



أكثر...
 
أعلى