Index: trunk/ippTools/src/warptool.c
===================================================================
--- trunk/ippTools/src/warptool.c	(revision 11766)
+++ trunk/ippTools/src/warptool.c	(revision 11769)
@@ -565,7 +565,77 @@
 }
 
+
+static bool parseAndInsertSkyCellMap(pxConfig *config, const char *mapfile);
+
 static bool addoverlapMode(pxConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(config, NULL);
+
+    bool status = false;
+    psString mapfile = psMetadataLookupStr(&status, config->args, "-mapfile");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -mapfile");
+        return false;
+    }
+    if (!mapfile) {
+        psError(PS_ERR_UNKNOWN, true, "-mapfile is required");
+        return false;
+    }
+
+    if (!parseAndInsertSkyCellMap(config, mapfile)) {
+    }
+
+    return true;
+}
+
+
+static bool parseAndInsertSkyCellMap(pxConfig *config, const char *mapfile)
+{
+    unsigned int nFail = 0;
+    psMetadata *skycells = psMetadataConfigRead(NULL, &nFail, mapfile, false);
+    if (!skycells) {
+        psError(PS_ERR_UNKNOWN, false, "failed to parse mapfile: %s", mapfile);
+        return false;
+    }        
+    if (nFail) {
+        psError(PS_ERR_UNKNOWN, false, "there were %d errors parsing mapfile: %s", nFail, mapfile);
+        psFree(skycells);
+        return false;
+    }
+
+    psMetadataItem *item = NULL;
+    psMetadataIterator *iter = psMetadataIteratorAlloc(skycells, 0, NULL);
+    if ((item = psMetadataGetAndIncrement(iter))) {
+        if (item->type != PS_DATA_METADATA) {
+            psError(PS_ERR_UNKNOWN, false, "mapfile: %s is in the wrong format", mapfile);
+            psFree(iter);
+            psFree(skycells);
+            return false;
+        }
+
+        psMetadata *sc = item->data.md;
+        // this conversion isn't strictly nessicary but it's an easy way of
+        // validating the format
+        p4SkyCellMapRow *row = p4SkyCellMapObjectFromMetadata(sc);
+        if (!row) {
+            psError(PS_ERR_UNKNOWN, false, "failed to convert mapfile: %s metdata entry into a p4SkyCellMap object", mapfile);
+            psFree(iter);
+            psFree(skycells);
+            return false;
+        }
+
+        if (!p4SkyCellMapInsertObject(config->dbh, row)) {
+            psError(PS_ERR_UNKNOWN, false, "failed to convert mapfile: %s metdata entry into a p4SkyCellMap object", mapfile);
+            psFree(row);
+            psFree(iter);
+            psFree(skycells);
+            return false;
+        }
+
+        psFree(row);
+    }
+    psFree(iter);
+    psFree(skycells);
+
     return true;
 }
