Index: trunk/Ohana/src/addstar/include/skycells.h
===================================================================
--- trunk/Ohana/src/addstar/include/skycells.h	(revision 28672)
+++ trunk/Ohana/src/addstar/include/skycells.h	(revision 28673)
@@ -72,4 +72,5 @@
 double CENTER_RA, CENTER_DEC;
 double RANGE_RA,  RANGE_DEC;
+double OVERLAP_RA, OVERLAP_DEC;
 
 double EULER_A;
Index: trunk/Ohana/src/addstar/src/args_skycells.c
===================================================================
--- trunk/Ohana/src/addstar/src/args_skycells.c	(revision 28672)
+++ trunk/Ohana/src/addstar/src/args_skycells.c	(revision 28673)
@@ -86,4 +86,13 @@
       help ();
     }
+    OVERLAP_RA = 0;
+    OVERLAP_DEC = 0;
+    if ((N = get_argument (argc, argv, "-overlap"))) {
+      remove_argument (N, &argc, argv);
+      OVERLAP_RA  = atof (argv[N]);
+      remove_argument (N, &argc, argv);
+      OVERLAP_DEC  = atof (argv[N]);
+      remove_argument (N, &argc, argv);
+    }
   }
 
@@ -113,5 +122,5 @@
   }
 
-  /* pixel scale (arcsec/pixel) */
+  /* padding fraction */
   PADDING = 0.0;
   if ((N = get_argument (argc, argv, "-padding"))) {
Index: trunk/Ohana/src/addstar/src/sky_tessalation.c
===================================================================
--- trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 28672)
+++ trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 28673)
@@ -671,4 +671,8 @@
   snprintf (format, 24, "%s.%%0%dd", input[0].name, Ndigit);
 
+  // if requested extend, the skycell boundaries so that skycells overlap
+  int pad_x = (int) (OVERLAP_RA / SCALE);
+  int pad_y = (int) (OVERLAP_DEC / SCALE);
+
   N = 0;
   for (j = 0; j < Ny; j++) {
@@ -679,10 +683,10 @@
 
       snprintf (output[N].name, DVO_IMAGE_NAME_LEN, format, N);
-      output[N].NX = NX;
-      output[N].NY = NY;
+      output[N].NX = NX + 2 * pad_x;
+      output[N].NY = NY + 2 * pad_y;
       output[N].photcode = input[0].photcode;
 
-      output[N].coords.crpix1 = input[0].coords.crpix1 - i*NX;
-      output[N].coords.crpix2 = input[0].coords.crpix2 - j*NY;
+      output[N].coords.crpix1 = input[0].coords.crpix1 - i*NX + pad_x;
+      output[N].coords.crpix2 = input[0].coords.crpix2 - j*NY + pad_y;
       N++;
     }
