1

I'm using MapProxy to seed a CouchDB with tile images on a FreeBSD server.

My workflow is Tilemill -> mbtiles export -> mapproxy seed -> CouchDB. For zoom levels 10 - 17, rendering takes ~ 2-3 days, but produces a quite small db file @ ~2mb. I attribute this to the large spaces with no data and the use of link_single_color_images: true

In an effort to speed the rendering process up, I have tried rendering with mapnik.xml as my source instead of the mbtiles produced by Tilemill. All good with a tremendous speed up, but at the cost of a database that is 20x larger due to MapProxy producing a tile for every z/x/y. Most of the thousands of tiles produced are transparent with no data.

Aka link_single_color_images: true does not seem to be working with Mapnik source, but does with mbtiles as a source.

Is there a way to use link_single_color_image with Mapnik?

1
  • Mbtiles would have already created the aliases to a single tile. I'm suspecting that link single color image is not configured or working correctly for either case. Commented Nov 6, 2014 at 5:16

1 Answer 1

1

So completely changed my workflow and I have compact couchdb databases in a matter of seconds/minutes from mbtiles. Reduced Tilemill -> Couchdb rendering by days.

New workflow: Tilemill -> mbtiles -> cdbtiles -> couchdb

Using more of the great open-source software by MapBox et al (https://github.com/mapbox and mapbox.com)

Couple of gotchs to installing cdbtiles, at least for my PCBSD/FreeBSD 10.0 system. See: https://www.npmjs.org/package/cdbtiles or the github

npm install cdbtiles doesn't work, use git clone as below. Had to make ln -s python2 python for mbtiles install or fix the python env

Install - FreeBSD 10.0:

  1. install node
  2. install npm (separate in FreeBSD ports)
  3. setenv CXX clang++
  4. setenv CC clang
  5. install devel/gmake
  6. npm install tilelive -g
  7. git clone https://github.com/mapbox/node-mbtiles.git
  8. cd to node-mbtiles dir
  9. npm install -g (gave me some grief, just fix errors - see above)
  10. git clone https://github.com/vsivsi/cdbtiles.git
  11. cd to cdbtiles dir
  12. npm install -g

see: https://www.npmjs.org/package/cdbtiles

Use cmd: /usr/local/lib/node_modules/tilelive/bin/copy -s pyramid --minzoom=10 --maxzoom=18 "mbtiles:///Users/user/maps/Columbus.mbtiles" "cdbtiles://127.0.0.1:5984/columbus_tiles/"

Obviously sorted for your parameters and system.

Yields CouchDB of tiles same size as mbtiles imput file after compaction.

Access tiles from ol3:

my_tiles_couchdbLayerXYZ = new ol.layer.Tile({
    source: new ol.source.XYZ({url: "http://127.0.0.1:5984/xxxxx_cdbtiles
        /tile_{z}_{x}_{y}/tile"
    })
});

Your Answer

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

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