You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Mapnik on Lambda, with a PostGIS database which has already worked well with pgraster tile creation. However, since the migration to Lambda, the pgraster fails to render anything but empty tiles. (Regular raster tiles from PostGIS work well.)
There are no error messages, and all seems fine. (I can even query the dataset on any points, and correct data is returned from PostGIS.)
The only main difference from the previously working pgraster setup is really the Mapnik version, which now is 4.5.6. Has there been any special changes to Mapnik recently, which could effect pgraster?
Is there anything that looks wrong below, regarding rendering data with pgraster? (Note that the below code works well for postgis data.)
Logs, code, etc..
Pseudo-code for tile rendering in Lambda.. (removed error handling, saving, etc).
module.exports.raster=function(event,context){// register mapnik modulesmapnik.register_default_fonts();mapnik.register_default_input_plugins();mapnik.register_datasource(path.join(mapnik.settings.paths.input_plugins,'postgis.input'));mapnik.register_datasource(path.join(mapnik.settings.paths.input_plugins,'pgraster.input'));// <- no errorconsole.log('Mapnik version:',mapnik.version);// 4.5.6// create layervarlayer=newmapnik.Layer('layer',data.proj);// create datasourcevardatasource=newmapnik.Datasource(data.postgis_settings);// <- see below for content// set datasourcelayer.datasource=datasource;// add styleslayer.styles=['layer'];// create mapvarmap=newmapnik.Map(256,256,data.proj);// set buffermap.bufferSize=data.bufferSize;// set extentmap.extent=data.bbox;// add layer to mapmap.add_layer(layer);// add xml (async)map.fromString(data.xml,{strict : true},function(err,new_map){// <- see below for xml// map optionsvarmap_options={buffer_size : data.bufferSize,variables : {zoom : data.params.z}}// create imagevarim=newmapnik.Image(256,256);// render imagenew_map.render(im,map_options,function(err,tile){tile.encode('png8',function(err,buffer){// ok });});});};
Using Mapnik on Lambda, with a PostGIS database which has already worked well with
pgraster
tile creation. However, since the migration to Lambda, thepgraster
fails to render anything but empty tiles. (Regular raster tiles from PostGIS work well.)There are no error messages, and all seems fine. (I can even query the dataset on any points, and correct data is returned from PostGIS.)
The only main difference from the previously working
pgraster
setup is really the Mapnik version, which now is4.5.6
. Has there been any special changes to Mapnik recently, which could effectpgraster
?Is there anything that looks wrong below, regarding rendering data with
pgraster
? (Note that the below code works well forpostgis
data.)Logs, code, etc..
Pseudo-code for tile rendering in Lambda.. (removed error handling, saving, etc).
PostGIS logs:
The text was updated successfully, but these errors were encountered: