3

mbpipe is a simple utility to batch process images in an MBTiles database (sqlite) by piping them to an image processing program.

But how does one install and use it?

It says here that mbpipe comes with the mbtiles node.js module, that is installed with the command npm install -g mbtiles.

However after doing that there is in fact something in /usr/local/lib/node_modules/mbtiles but the "mbpipe" command or script cannot be found anywhere on my machine.

What should one do...?

Edit: on the github page for node-mbtiles it apparently says that the mbpipe utility was removed from the mbtiles module, but no one seems to be following up on this issue.

Is there another utility to do the same? (It should be pretty straightforward: extract images from an sqlite db, send them to a program for processing, re-insert the processed image).

1 Answer 1

1

You can find MBPipe in the bin dir of earlier releases of the npm mbtiles package. Once you bring it down you'll need to run npm install to read the package.json file and install the deps in it. Getting the sqlite3 library to compile on windows was a bit tricky for me as I recall. I think I eventually found a precompiled 'binary' on the webs somewhere.

I mainly use it with pngquant. On windows, throw that binary in a directory and add it to your path var and you should be good to go with the mbpipe examples that you've linked to above.

Another thing to note, when I originally starting using it, I didn't understand the console output. When it starts it outputs a little graph and then appends hash # symbols underneath the graph to show progress.

I use it and it def. helps to optimize my caches.

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.