T
T
thinklab2018-02-16 17:25:17
Python
thinklab, 2018-02-16 17:25:17

How to get a map from postgis for mapnik?

I built a test application on django + postgis, put the shp file into the database. Now I can't get from postgis shp for mapnik. I'm reading this example and I don't really understand how the request is inserted into PostGIS (), it doesn't work for me. Is there any easier way to get shp?
https://web.archive.org/web/20160318085049/http://...

db_params['table'] = '(select ST_Buffer(geometry, 1) as geometry from %s) polygon' % db_params['table']
lyr2.datasource = PostGIS(**db_params)

I can get an object from the model through the TestFields.objects.last() model, but how can I pass these objects to mapnik?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question