Tag Info

New answers tagged

0

From the plugin web page: column separator The plugin will read the first line of the file to count the occurrences of ,, \t, |, and ; as possible delimiters of columns. You can disable this auto-detection by passing the separator option. In other words, by default the plugin will look for a number of separators other than comma as the column ...


1

Figured it out. I needed to add in: map.aspect_fix_mode = mapnik.Map.ASPECT_RESPECT; before: map.extent = bbox;


2

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 ...


0

It sounds like what you are really wanting is to be able to override specific tiles in a map. I have implemented this with TileLayers in Google Maps in the past. Not sure how to do this with OSM, but there should be a tile request hook in your javascript that would allow you to point at a script to check a local cache before forwarding the request out to a ...


2

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 ...



Top 50 recent answers are included