Index: gen_tile.cpp
===================================================================
--- gen_tile.cpp	(revision 22946)
+++ gen_tile.cpp	(working copy)
@@ -50,7 +50,7 @@
 #endif
 
 static const int minZoom = 0;
-static const int maxZoom = 18;
+static const int maxZoom = MAX_ZOOM;
 
 typedef struct {
     char xmlname[XMLCONFIG_MAX];
@@ -71,7 +71,7 @@
     double *Ac, *Bc, *Cc, *zc;
 
     public:
-        SphericalProjection(int levels=18) {
+        SphericalProjection(int levels=MAX_ZOOM) {
             Ac = new double[levels];
             Bc = new double[levels];
             Cc = new double[levels];
Index: render_list.c
===================================================================
--- render_list.c	(revision 22946)
+++ render_list.c	(working copy)
@@ -31,7 +31,7 @@
 #else
 
 static int minZoom = 0;
-static int maxZoom = 18;
+static int maxZoom = MAX_ZOOM;
 static int verbose = 0;
 static int maxLoad = MAX_LOAD_OLD;
 
@@ -402,15 +402,15 @@
                 break;
             case 'z':   /* -z, --min-zoom */
                 minZoom=atoi(optarg);
-                if (minZoom < 0 || minZoom > 18) {
-                    fprintf(stderr, "Invalid minimum zoom selected, must be between 0 and 18\n");
+                if (minZoom < 0 || minZoom > MAX_ZOOM) {
+                    fprintf(stderr, "Invalid minimum zoom selected, must be between 0 and %d\n", MAX_ZOOM);
                     return 1;
                 }
                 break;
             case 'Z':   /* -Z, --max-zoom */
                 maxZoom=atoi(optarg);
-                if (maxZoom < 0 || maxZoom > 18) {
-                    fprintf(stderr, "Invalid maximum zoom selected, must be between 0 and 18\n");
+                if (maxZoom < 0 || maxZoom > MAX_ZOOM) {
+                    fprintf(stderr, "Invalid maximum zoom selected, must be between 0 and %d\n", MAX_ZOOM);
                     return 1;
                 }
                 break;
@@ -430,7 +430,7 @@
                 fprintf(stderr, "  -n, --num-threads=N the number of parallel request threads (default 1)\n");
                 fprintf(stderr, "  -t, --tile-dir       tile cache directory (defaults to '" HASH_PATH "')\n");
                 fprintf(stderr, "  -z, --min-zoom=ZOOM  filter input to only render tiles greater or equal to this zoom level (default is 0)\n");
-                fprintf(stderr, "  -Z, --max-zoom=ZOOM  filter input to only render tiles less than or equal to this zoom level (default is 18)\n");
+                fprintf(stderr, "  -Z, --max-zoom=ZOOM  filter input to only render tiles less than or equal to this zoom level (default is %d)\n", MAX_ZOOM);
                 fprintf(stderr, "If you are using --all, you can restrict the tile range by adding these options:\n");
                 fprintf(stderr, "  -x, --min-x=X        minimum X tile coordinate\n");
                 fprintf(stderr, "  -X, --max-x=X        maximum X tile coordinate\n");
Index: render_old.c
===================================================================
--- render_old.c	(revision 22946)
+++ render_old.c	(working copy)
@@ -35,7 +35,7 @@
 
 #define INILINE_MAX 256
 static int minZoom = 0;
-static int maxZoom = 18;
+static int maxZoom = MAX_ZOOM;
 static int verbose = 0;
 static int num_render = 0, num_all = 0;
 static time_t planetTime;
@@ -430,15 +430,15 @@
                 break;
            case 'z':   /* -z, --min-zoom */
                         minZoom=atoi(optarg);
-                if (minZoom < 0 || minZoom > 18) {
-                    fprintf(stderr, "Invalid minimum zoom selected, must be between 0 and 18\n");
+                if (minZoom < 0 || minZoom > MAX_ZOOM) {
+                    fprintf(stderr, "Invalid minimum zoom selected, must be between 0 and %d\n", MAX_ZOOM);
                     return 1;
                 }
                 break;
             case 'Z':   /* -Z, --max-zoom */
                 maxZoom=atoi(optarg);
-                if (maxZoom < 0 || maxZoom > 18) {
-                    fprintf(stderr, "Invalid maximum zoom selected, must be between 0 and 18\n");
+                if (maxZoom < 0 || maxZoom > MAX_ZOOM) { 
+                    fprintf(stderr, "Invalid maximum zoom selected, must be between 0 and %d\n", MAX_ZOOM);
                     return 1;
                 }
                 break;
@@ -451,7 +451,7 @@
                 fprintf(stderr, "  -n, --num-threads=N  the number of parallel request threads (default 1)\n");
                 fprintf(stderr, "  -t, --tile-dir       tile cache directory (defaults to '" HASH_PATH "')\n");
                 fprintf(stderr, "  -z, --min-zoom=ZOOM  filter input to only render tiles greater or equal to this zoom level (default 0)\n");
-                fprintf(stderr, "  -Z, --max-zoom=ZOOM  filter input to only render tiles less than or equal to this zoom level (default 18)\n");
+                fprintf(stderr, "  -Z, --max-zoom=ZOOM  filter input to only render tiles less than or equal to this zoom level (default %d)\n", MAX_ZOOM);
                 fprintf(stderr, "  -s, --socket=SOCKET  unix domain socket name for contacting renderd\n");
                 return -1;
             default:
Index: convert_meta.c
===================================================================
--- convert_meta.c	(revision 22946)
+++ convert_meta.c	(working copy)
@@ -33,7 +33,7 @@
 #else
 
 static int minZoom = 0;
-static int maxZoom = 18;
+static int maxZoom = MAX_ZOOM; 
 static int verbose = 0;
 static int num_render = 0, num_all = 0;
 static struct timeval start, end;
@@ -120,15 +120,15 @@
         switch (c) {
             case 'z':
                 minZoom=atoi(optarg);
-                if (minZoom < 0 || minZoom > 18) {
-                    fprintf(stderr, "Invalid minimum zoom selected, must be between 0 and 18\n");
+                if (minZoom < 0 || minZoom > MAX_ZOOM) { 
+                    fprintf(stderr, "Invalid minimum zoom selected, must be between 0 and %d\n", MAX_ZOOM);
                     return 1;
                 }
                 break;
             case 'Z':
                 maxZoom=atoi(optarg);
-                if (maxZoom < 0 || maxZoom > 18) {
-                    fprintf(stderr, "Invalid maximum zoom selected, must be between 0 and 18\n");
+                if (maxZoom < 0 || maxZoom > MAX_ZOOM) {
+                    fprintf(stderr, "Invalid maximum zoom selected, must be between 0 and %d\n", MAX_ZOOM);
                     return 1;
                 }
                 break;
@@ -151,7 +151,7 @@
                 fprintf(stderr, "  -t, --tile-dir  tile cache directory (default is '" HASH_PATH "')\n");
                 fprintf(stderr, "  -u, --unpack    unpack the .meta files back to PNGs\n");
                 fprintf(stderr, "  -z, --min-zoom  only process tiles greater or equal to this zoom level (default is 0)\n");
-                fprintf(stderr, "  -Z, --max-zoom  only process tiles less than or equal to this zoom level (default is 18)\n");
+                fprintf(stderr, "  -Z, --max-zoom  only process tiles less than or equal to this zoom level (default is %d)\n", MAX_ZOOM);
                 return -1;
             default:
                 fprintf(stderr, "unhandled char '%c'\n", c);
