           Logger.debug('Parsed ' + geometryCount + '/' + c3mls.length + ' geometries')
 
       _.each c3mls, (c3ml, i) =>
+        if args.forEachC3ml
+          c3ml = c3mls[i] = args.forEachC3ml.call(EntityImporter, c3ml, i) ? c3ml
         c3mlId = c3ml.id
         c3mlMap[c3mlId] = c3ml
         # TODO(aramk) Use the ID given by ACS instead of attempting to name it here.

            border_color: border_color
          inputs: inputs
      model = @_mapEntity(model, args) ? model
      callback = (err, insertId) ->
        if err
          Logger.error('Failed to insert entity', err)

          modelDf.reject(err)
        else
          modelDf.resolve(insertId)
      
      Entities.insert model, callback
    
    modelDf.promise

  _mapEntity: (doc) -> doc
