Tag Info

Hot answers tagged


Turns out it is as easy as this: MIMETYPE "application/json; subtype=geojson; charset=utf-8" Without the setting, no content encoding is returned by the server.


Stepping back, if you have data in PostGIS and you want to render it with Mapnik you really should be using Mapnik's native PostGIS support - aka mapnik.PostGIS datasource in python (https://github.com/mapnik/mapnik/wiki/PostGIS). That will be faster and more efficient than going through OGR. That said, if you have a good reason for connecting to PostGIS ...


Depending on your version of mapnik, yes it's possible. Mapnik 2.1 introduced the Python Plugin as a data source. You would need to subclass mapnik.PythonDatasource and implement a features method that based on an incoming mapnik.Query object will return mapnik.PythonDatasource.wkb_features objects. For example: import mapnik import ogr class ...


For the sake of completeness. I believe this should be a comment on Regan response. But since I don't have enough reputation I'll leave it as a response. The DXF writer supports 2.5D layers, and given a line input, should output a 3D linestring on dxf. In the case of input POLYGONS you have to be more careful, since the driver defaults to generate a dxf ...

Only top voted, non community-wiki answers of a minimum length are eligible