Skip to main content
updated for FreeBSD 10.0
Source Link

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 ..toto 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"
    })
});

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 (https://github.com/mapbox and mapbox.com)

Couple gotchs to installing cdbtiles, at least for my 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:

  1. node
  2. npm
  3. npm install tilelive -g
  4. git clone https://github.com/mapbox/node-mbtiles.git
  5. cd ..to node-mbtiles dir
  6. npm install -g (gave me some grief, just fix errors - see above)
  7. git clone https://github.com/vsivsi/cdbtiles.git
  8. cd .. to cdbtiles dir
  9. 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"
    })
});

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"
    })
});
Source Link

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 (https://github.com/mapbox and mapbox.com)

Couple gotchs to installing cdbtiles, at least for my 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:

  1. node
  2. npm
  3. npm install tilelive -g
  4. git clone https://github.com/mapbox/node-mbtiles.git
  5. cd ..to node-mbtiles dir
  6. npm install -g (gave me some grief, just fix errors - see above)
  7. git clone https://github.com/vsivsi/cdbtiles.git
  8. cd .. to cdbtiles dir
  9. 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"
    })
});