I've got a PostGIS NHD layer thats not rendering in mapnik (using toposm code scripts) and I don't know why.

I've confirmed that the table data is there, positioned correctly and has the proper projection via QGIS, and the styles seem to have the table names correctly, but I'm still getting a features layer without my nhd water features.

Is there a way I can tell mapnik.render to spit out the queries its running against my PostGIS db? Is there another way to debug this?

1 Answer 1


Yes, you can build Mapnik to enable all postgres queries details to be output. See https://github.com/mapnik/mapnik/wiki/Runtime-Logging for more details.

However, it is easiest to just enable logging of postgres itself. One way that I frequently do this is to launch postgres from the command line like:

postgres -D /path/to/postgres/directory -c log_min_duration_statement=0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.